'HIDEasy
'Copyright (C) 2011 ASFX

'This program is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public License
'as published by the Free Software Foundation; either version 2
'of the License, or (at your option) any later version.

'This program is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'GNU General Public License for more details.

'You should have received a copy of the GNU General Public License
'along with this program; if not, write to the Free Software
'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

'Imports USAGE = System.UInt16

<CLSCompliant(False)> _
Public Module HIDUsage
    Public Function GetUsagePageString(ByVal UsagePage As UShort) As String
        Dim _UsagePageString As String = "(unknown)"

        Select Case CType(UsagePage, Page)
            Case Page.HID_USAGE_PAGE_UNDEFINED
                _UsagePageString = "Undefined"
            Case Page.HID_USAGE_PAGE_GENERIC
                _UsagePageString = "Generic"
            Case Page.HID_USAGE_PAGE_SIMULATION
                _UsagePageString = "Simulation"
            Case Page.HID_USAGE_PAGE_VR
                _UsagePageString = "Virtual Reality"
            Case Page.HID_USAGE_PAGE_SPORT
                _UsagePageString = "Sport"
            Case Page.HID_USAGE_PAGE_GAME
                _UsagePageString = "Game"
            Case Page.HID_USAGE_PAGE_GENERIC_GAME_CONTROLS
                _UsagePageString = "Game Controls"
            Case Page.HID_USAGE_PAGE_KEYBOARD
                _UsagePageString = "Keyboard / Keypad"
            Case Page.HID_USAGE_PAGE_LED
                _UsagePageString = "Led"
            Case Page.HID_USAGE_PAGE_BUTTON
                _UsagePageString = "Button"
            Case Page.HID_USAGE_PAGE_ORDINAL
                _UsagePageString = "Ordinal"
            Case Page.HID_USAGE_PAGE_TELEPHONY
                _UsagePageString = "Telephony"
            Case Page.HID_USAGE_PAGE_CONSUMER
                _UsagePageString = "Consumer"
            Case Page.HID_USAGE_PAGE_DIGITIZER
                _UsagePageString = "Digitizer"
            Case Page.HID_USAGE_PAGE_PHYSICAL_INPUT_DEVICE
                _UsagePageString = "Physical Input Device"
            Case Page.HID_USAGE_PAGE_UNICODE
                _UsagePageString = "Unicode"
            Case Page.HID_USAGE_PAGE_ALPHANUMERIC
                _UsagePageString = "Alphanumeric"
            Case Page.HID_USAGE_PAGE_MEDICAL_INSTRUMENT
                _UsagePageString = "Medical Instrument"
            Case Page.HID_USAGE_PAGE_USB_MONITOR
                _UsagePageString = "USB Monitor"
            Case Page.HID_USAGE_PAGE_MONITOR_ENUMERATED_VALUES
                _UsagePageString = "Monitor Enumerated Values"
            Case Page.HID_USAGE_PAGE_MONITOR_VESA_VIRTUAL_CONTROLS
                _UsagePageString = "Monitor Vesa Virtual Controls"
            Case Page.HID_USAGE_PAGE_RESERVED
                _UsagePageString = "Reserved"
            Case Page.HID_USAGE_PAGE_POWER_DEVICE
                _UsagePageString = "Power Device"
            Case Page.HID_USAGE_PAGE_BATTERY_SYSTEM
                _UsagePageString = "Battery System"
            Case Page.HID_USAGE_PAGE_BARCODE_SCANNER
                _UsagePageString = "Barcode Scanner"
            Case Page.HID_USAGE_PAGE_WEIGHING_DEVICE
                _UsagePageString = "Weighing Device"
            Case Page.HID_USAGE_PAGE_MAGNETIC_STRIPE_READER
                _UsagePageString = "Magnetic Stripe Reader"
            Case Else
                _UsagePageString = "(unknown page:" & UsagePage.ToString & ")"
        End Select
        Return _UsagePageString
    End Function

    Public Function GetEnumOfUsageID(ByVal UsagePage As UShort) As [Enum]
        Dim _UsageIDEnum As [Enum]
        Select Case UsagePage
            Case Page.HID_USAGE_PAGE_UNDEFINED
                _UsageIDEnum = Nothing
            Case Page.HID_USAGE_PAGE_GENERIC
                _UsageIDEnum = New GenericDesktopPage
            Case Page.HID_USAGE_PAGE_SIMULATION
                _UsageIDEnum = New SimulationControlsPage
            Case Page.HID_USAGE_PAGE_VR
                _UsageIDEnum = New VirtualRealityControlsPage
            Case Page.HID_USAGE_PAGE_SPORT
                _UsageIDEnum = New SportControlsPage
            Case Page.HID_USAGE_PAGE_GAME
                _UsageIDEnum = New GameControlsPage
            Case Page.HID_USAGE_PAGE_GENERIC_GAME_CONTROLS
                _UsageIDEnum = New GenericDeviceControlsPage
            Case Page.HID_USAGE_PAGE_KEYBOARD
                _UsageIDEnum = New KeyboardKeyPadPage
            Case Page.HID_USAGE_PAGE_LED
                _UsageIDEnum = New LEDPage
            Case Page.HID_USAGE_PAGE_BUTTON
                _UsageIDEnum = New ButtonPage
            Case Page.HID_USAGE_PAGE_ORDINAL
                _UsageIDEnum = New OrdinalPage
            Case Page.HID_USAGE_PAGE_TELEPHONY
                _UsageIDEnum = New TelephonyDevicePage
            Case Page.HID_USAGE_PAGE_CONSUMER
                _UsageIDEnum = New ConsumerPage
            Case Page.HID_USAGE_PAGE_DIGITIZER
                _UsageIDEnum = New DigitizerPage
            Case Page.HID_USAGE_PAGE_PHYSICAL_INPUT_DEVICE
                _UsageIDEnum = New PhysicalInputPage
            Case Page.HID_USAGE_PAGE_UNICODE
                _UsageIDEnum = Nothing
            Case Page.HID_USAGE_PAGE_ALPHANUMERIC
                _UsageIDEnum = New AlphanumericDisplayPage
            Case Page.HID_USAGE_PAGE_MEDICAL_INSTRUMENT
                _UsageIDEnum = New MedicalInstrumentPage
            Case Page.HID_USAGE_PAGE_USB_MONITOR
                _UsageIDEnum = New USBMonitorPage
            Case Page.HID_USAGE_PAGE_MONITOR_ENUMERATED_VALUES
                _UsageIDEnum = New MonitorEnumeratedValuesPage
            Case Page.HID_USAGE_PAGE_MONITOR_VESA_VIRTUAL_CONTROLS
                _UsageIDEnum = New MonitorVESAVirtualControlPage
            Case Page.HID_USAGE_PAGE_RESERVED
                _UsageIDEnum = Nothing
            Case Page.HID_USAGE_PAGE_POWER_DEVICE
                _UsageIDEnum = New PowerDevicePage
            Case Page.HID_USAGE_PAGE_BATTERY_SYSTEM
                _UsageIDEnum = New BatterySystemPage
            Case Page.HID_USAGE_PAGE_BARCODE_SCANNER
                _UsageIDEnum = New BarcodeScannerPage
            Case Page.HID_USAGE_PAGE_WEIGHING_DEVICE
                _UsageIDEnum = New WeighingDevicePage
            Case Page.HID_USAGE_PAGE_MAGNETIC_STRIPE_READER
                _UsageIDEnum = New MagneticStripeReaderPage
            Case Else
                _UsageIDEnum = Nothing
        End Select
        Return _UsageIDEnum
    End Function

    Public Function GetUsageIDString(ByVal UsagePage As UShort, _
                                     ByVal UsageID As UShort) As String
        Dim _UsageIDString As String

        Dim _UsageIDEnum As [Enum] = GetEnumOfUsageID(UsagePage)
        If _UsageIDEnum Is Nothing Then
            _UsageIDString = "[" & UsageID.ToString() & "]"
        Else
            Dim _obj As Object = [Enum].Parse(_UsageIDEnum.GetType, UsageID.ToString)

            _UsageIDString = CType(_obj, [Enum]).ToString("g")

            If _UsageIDString.StartsWith("HID_USAGE_") Then
                _UsageIDString = _UsageIDString.Remove(0, "HID_USAGE_".Length)
            End If
            If _UsageIDString.StartsWith(GetUsagePageString(UsagePage)) Then
                _UsageIDString = _UsageIDString.Remove(0, GetUsagePageString(UsagePage).Length)
            End If
            _UsageIDString = _UsageIDString.Replace("_", " ")
        End If
        _UsageIDString = CapitalFirstLetter(_UsageIDString)

        If _UsageIDString.Length=0 Then _UsageIDString = "[" & UsageID.ToString() & "]"
        Return _UsageIDString
    End Function

    Private Function CapitalFirstLetter(ByVal str As String) As String
        ' Found this code here: http://support.microsoft.com/kb/109220
        ' But need minors modifications ;)
        If str.Length=0 Then Return ""

        str = str.ToLower

        Mid$(str, 1, 1) = UCase$(Mid$(str, 1, 1))

        For i As Integer = 1 To Len(str)-1
            If Not Char.IsLetter(CChar(Mid$(str, i, 1))) Then
                Mid$(str, i+1, 1) = UCase$(Mid$(str, i+1, 1))
            End If
        Next
        Return str
    End Function

    '
    ' Usage Pages
    '
    Public Enum Page As UShort
        HID_USAGE_PAGE_UNDEFINED = &H0
        HID_USAGE_PAGE_GENERIC = &H1
        HID_USAGE_PAGE_SIMULATION = &H2
        HID_USAGE_PAGE_VR = &H3
        HID_USAGE_PAGE_SPORT = &H4
        HID_USAGE_PAGE_GAME = &H5
        HID_USAGE_PAGE_GENERIC_GAME_CONTROLS = &H6
        HID_USAGE_PAGE_KEYBOARD = &H7
        HID_USAGE_PAGE_LED = &H8
        HID_USAGE_PAGE_BUTTON = &H9
        HID_USAGE_PAGE_ORDINAL = &HA
        HID_USAGE_PAGE_TELEPHONY = &HB
        HID_USAGE_PAGE_CONSUMER = &HC
        HID_USAGE_PAGE_DIGITIZER = &HD
        HID_USAGE_PAGE_PHYSICAL_INPUT_DEVICE = &HF
        HID_USAGE_PAGE_UNICODE = &H10
        HID_USAGE_PAGE_ALPHANUMERIC = &H14

        HID_USAGE_PAGE_MEDICAL_INSTRUMENT = &H40

        HID_USAGE_PAGE_USB_MONITOR = &H80
        HID_USAGE_PAGE_MONITOR_ENUMERATED_VALUES = &H81
        HID_USAGE_PAGE_MONITOR_VESA_VIRTUAL_CONTROLS = &H82
        HID_USAGE_PAGE_RESERVED = &H83
        HID_USAGE_PAGE_POWER_DEVICE = &H84
        HID_USAGE_PAGE_BATTERY_SYSTEM = &H85
        HID_USAGE_PAGE_BARCODE_SCANNER = &H8C
        HID_USAGE_PAGE_WEIGHING_DEVICE = &H8D
        HID_USAGE_PAGE_MAGNETIC_STRIPE_READER = &H8E
    End Enum

    '
    ' Usages from Generic Desktop Page (0x01)
    '
    Public Enum GenericDesktopPage As UShort
        HID_USAGE_UNDEFINED = &H0
        HID_USAGE_GENERIC_POINTER = &H1
        HID_USAGE_GENERIC_MOUSE = &H2
        HID_USAGE_GENERIC_RESERVED1 = &H3
        HID_USAGE_GENERIC_JOYSTICK = &H4
        HID_USAGE_GENERIC_GAMEPAD = &H5
        HID_USAGE_GENERIC_KEYBOARD = &H6
        HID_USAGE_GENERIC_KEYPAD = &H7
        HID_USAGE_GENERIC_MULTIAXIS = &H8

        HID_USAGE_GENERIC_X = &H30
        HID_USAGE_GENERIC_Y = &H31
        HID_USAGE_GENERIC_Z = &H32
        HID_USAGE_GENERIC_RX = &H33
        HID_USAGE_GENERIC_RY = &H34
        HID_USAGE_GENERIC_RZ = &H35
        HID_USAGE_GENERIC_SLIDER = &H36
        HID_USAGE_GENERIC_DIAL = &H37
        HID_USAGE_GENERIC_WHEEL = &H38
        HID_USAGE_GENERIC_HATSWITCH = &H39
        HID_USAGE_GENERIC_COUNTED_BUFFER = &H3A
        HID_USAGE_GENERIC_BYTE_COUNT = &H3B
        HID_USAGE_GENERIC_MOTION_WAKEUP = &H3C
        HID_USAGE_GENERIC_START = &H3D
        HID_USAGE_GENERIC_SELECT = &H3E
        HID_USAGE_GENERIC_RESERVED2 = &H3F
        HID_USAGE_GENERIC_VX = &H40
        HID_USAGE_GENERIC_VY = &H41
        HID_USAGE_GENERIC_VZ = &H42
        HID_USAGE_GENERIC_VBRX = &H43
        HID_USAGE_GENERIC_VBRY = &H44
        HID_USAGE_GENERIC_VBRZ = &H45
        HID_USAGE_GENERIC_VNO = &H46
        HID_USAGE_FEATURE_NOTIFICATION = &H47
        HID_USAGE_GENERIC_SYSTEM_CTL = &H80
        HID_USAGE_GENERIC_SYSCTL_POWER = &H81
        HID_USAGE_GENERIC_SYSCTL_SLEEP = &H82
        HID_USAGE_GENERIC_SYSCTL_WAKE = &H83
        HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU = &H84
        HID_USAGE_GENERIC_SYSCTL_MAIN_MENU = &H85
        HID_USAGE_GENERIC_SYSCTL_APP_MENU = &H86
        HID_USAGE_GENERIC_SYSCTL_HELP_MENU = &H87
        HID_USAGE_GENERIC_SYSCTL_MENU_EXIT = &H88
        HID_USAGE_GENERIC_SYSCTL_MENU_SELECT = &H89
        HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT = &H8A
        HID_USAGE_GENERIC_SYSCTL_MENU_LEFT = &H8B
        HID_USAGE_GENERIC_SYSCTL_MENU_UP = &H8C
        HID_USAGE_GENERIC_SYSCTL_MENU_DOWN = &H8D
        HID_USAGE_GENERIC_SYSCTL_COLD_RESTART = &H8E
        HID_USAGE_GENERIC_SYSCTL_WARM_RESTART = &H8F
        HID_USAGE_GENERIC_SYSCTL_DPAD_UP = &H90
        HID_USAGE_GENERIC_SYSCTL_DPAD_DOWN = &H91
        HID_USAGE_GENERIC_SYSCTL_DPAD_RIGHT = &H92
        HID_USAGE_GENERIC_SYSCTL_DPAD_LEFT = &H93

        HID_USAGE_GENERIC_SYSCTL_DOCK = &HA0
        HID_USAGE_GENERIC_SYSCTL_UNDOCK = &HA1
        HID_USAGE_GENERIC_SYSCTL_SETUP = &HA2
        HID_USAGE_GENERIC_SYSCTL_BREAK = &HA3
        HID_USAGE_GENERIC_SYSCTL_DEBUGGER_BREAK = &HA4
        HID_USAGE_GENERIC_SYSCTL_APP_BREAK = &HA5
        HID_USAGE_GENERIC_SYSCTL_APP_DEBUGGER_BREAK = &HA6
        HID_USAGE_GENERIC_SYSCTL_SYSTEM_SPEAKER_MUTE = &HA7
        HID_USAGE_GENERIC_SYSCTL_SYSTEM_HIBERNATE = &HA8

        HID_USAGE_GENERIC_SYSCTL_DISPLAY_INVERT = &HB0
        HID_USAGE_GENERIC_SYSCTL_DISPLAY_INTERNAL = &HB1
        HID_USAGE_GENERIC_SYSCTL_DISPLAY_EXTERNAL = &HB2
        HID_USAGE_GENERIC_SYSCTL_DISPLAY_BOTH = &HB3
        HID_USAGE_GENERIC_SYSCTL_DISPLAY_DUAL = &HB4
        HID_USAGE_GENERIC_SYSCTL_DISPLAY_TOGGLE_INT_EXT = &HB5
        HID_USAGE_GENERIC_SYSCTL_DISPLAY_SWAP = &HB6
        HID_USAGE_GENERIC_SYSCTL_DISPLAY_LCD_AUTOSCALE = &HB7
    End Enum

    '
    ' Usages from Simulation Controls Page (0x02)
    '
    Public Enum SimulationControlsPage As UShort
        HID_USAGE_SIMULATION_UNDEFINED = &H0
        HID_USAGE_SIMULATION_FLIGHT = &H1
        HID_USAGE_SIMULATION_AUTOMOBILE = &H2
        HID_USAGE_SIMULATION_TANK = &H3
        HID_USAGE_SIMULATION_SPACESHIP = &H4
        HID_USAGE_SIMULATION_SUBMARINE = &H5
        HID_USAGE_SIMULATION_SAILING = &H6
        HID_USAGE_SIMULATION_MOTORCYCLE = &H7
        HID_USAGE_SIMULATION_SPORTS = &H8
        HID_USAGE_SIMULATION_AIRPLANE = &H9
        HID_USAGE_SIMULATION_HELICOPTER = &HA
        HID_USAGE_SIMULATION_MAGIC_CARPET = &HB
        HID_USAGE_SIMULATION_BICYCLE = &HC
        HID_USAGE_SIMULATION_FLIGHT_CONTROL_STICK = &H20
        HID_USAGE_SIMULATION_FLIGHT_STICK = &H21
        HID_USAGE_SIMULATION_CYCLIC_CONTROL = &H22
        HID_USAGE_SIMULATION_CYCLIC_TRIM = &H23
        HID_USAGE_SIMULATION_FLIGHT_YOKE = &H24
        HID_USAGE_SIMULATION_TRACK_CONTROL = &H25
        HID_USAGE_SIMULATION_AILERON = &HB0
        HID_USAGE_SIMULATION_AILERON_TRIM = &HB1
        HID_USAGE_SIMULATION_ANTITORQUE_CONTROL = &HB2
        HID_USAGE_SIMULATION_AUTOPILOT_ENABLE = &HB3
        HID_USAGE_SIMULATION_CHAFF_RELEASE = &HB4
        HID_USAGE_SIMULATION_COLLECTIVE_CONTROL = &HB5
        HID_USAGE_SIMULATION_DIVE_BREAK = &HB6
        HID_USAGE_SIMULATION_ELECTRONIC_COUNTERMEASURES = &HB7
        HID_USAGE_SIMULATION_ELEVATOR = &HB8
        HID_USAGE_SIMULATION_ELEVATOR_TRIM = &HB9
        HID_USAGE_SIMULATION_RUDDER = &HBA
        HID_USAGE_SIMULATION_THROTTLE = &HBB
        HID_USAGE_SIMULATION_FLIGHT_COMMUNICATIONS = &HBC
        HID_USAGE_SIMULATION_FLARE_RELEASE = &HBD
        HID_USAGE_SIMULATION_LANDING_GEAR = &HBE
        HID_USAGE_SIMULATION_TOE_BRAKE = &HBF
        HID_USAGE_SIMULATION_TRIGGER = &HC0
        HID_USAGE_SIMULATION_WEAPONS_ARM = &HC1
        HID_USAGE_SIMULATION_WEAPONS_SELECT = &HC2
        HID_USAGE_SIMULATION_WING_FLAPS = &HC3
        HID_USAGE_SIMULATION_ACCELERATOR = &HC4
        HID_USAGE_SIMULATION_BRAKE = &HC5
        HID_USAGE_SIMULATION_CLUTCH = &HC6
        HID_USAGE_SIMULATION_SHIFTER = &HC7
        HID_USAGE_SIMULATION_STEERING = &HC8
        HID_USAGE_SIMULATION_TURRET_DIRECTION = &HC9
        HID_USAGE_SIMULATION_BARREL_ELEVATION = &HCA
        HID_USAGE_SIMULATION_DIVE_PLANE = &HCB
        HID_USAGE_SIMULATION_BALLAST = &HCC
        HID_USAGE_SIMULATION_BICYCLE_CRANK = &HCD
        HID_USAGE_SIMULATION_HANDLE_BARS = &HCE
        HID_USAGE_SIMULATION_FRONT_BRAKE = &HCF
        HID_USAGE_SIMULATION_REAR_BRAKE = &HD0
    End Enum

    '
    ' Virtual Reality Controls Page (0x03)
    '
    Public Enum VirtualRealityControlsPage As UShort
        HID_USAGE_VR_UNDEFINED = &H0
        HID_USAGE_VR_BELT = &H1
        HID_USAGE_VR_BODY_SUIT = &H2
        HID_USAGE_VR_FLEXOR = &H3
        HID_USAGE_VR_GLOVE = &H4
        HID_USAGE_VR_HEAD_TRACKER = &H5
        HID_USAGE_VR_HEAD_MOUNTED_DISPLAY = &H6
        HID_USAGE_VR_HAND_TRACKER = &H7
        HID_USAGE_VR_OCULOMETER = &H8
        HID_USAGE_VR_VEST = &H9
        HID_USAGE_VR_ANIMATRONIC_DEVICE = &HA

        HID_USAGE_VR_STEREO_ENABLE = &H20
        HID_USAGE_VR_DISPLAY_ENABLE = &H21
    End Enum

    '
    ' Sport Controls Page (0x04)
    '
    Public Enum SportControlsPage As UShort
        HID_USAGE_SPORT_UNDEFINED = &H0
        HID_USAGE_SPORT_BASEBALL_BAT = &H1
        HID_USAGE_SPORT_GOLF_CLUB = &H2
        HID_USAGE_SPORT_ROWING_MACHINE = &H3
        HID_USAGE_SPORT_TREADMILL = &H4

        HID_USAGE_SPORT_OAR = &H30
        HID_USAGE_SPORT_SLOPE = &H31
        HID_USAGE_SPORT_RATE = &H32
        HID_USAGE_SPORT_STICK_SPEED = &H33
        HID_USAGE_SPORT_STICK_FACE_ANGLE = &H34
        HID_USAGE_SPORT_STICK_HEEL_TOE = &H35
        HID_USAGE_SPORT_STICK_FOLLOW_THROUGH = &H36
        HID_USAGE_SPORT_STICK_TEMPO = &H37
        HID_USAGE_SPORT_STICK_TYPE = &H38
        HID_USAGE_SPORT_STICK_HEIGHT = &H39

        HID_USAGE_SPORT_PUTTER = &H50
        HID_USAGE_SPORT_IRON_1 = &H51
        HID_USAGE_SPORT_IRON_2 = &H52
        HID_USAGE_SPORT_IRON_3 = &H53
        HID_USAGE_SPORT_IRON_4 = &H54
        HID_USAGE_SPORT_IRON_5 = &H55
        HID_USAGE_SPORT_IRON_6 = &H56
        HID_USAGE_SPORT_IRON_7 = &H57
        HID_USAGE_SPORT_IRON_8 = &H58
        HID_USAGE_SPORT_IRON_9 = &H59
        HID_USAGE_SPORT_IRON_10 = &H5A
        HID_USAGE_SPORT_IRON_11 = &H5B
        HID_USAGE_SPORT_SAND_WEDGE = &H5C
        HID_USAGE_SPORT_LOFT_WEDGE = &H5D
        HID_USAGE_SPORT_POWER_WEDGE = &H5E
        HID_USAGE_SPORT_WOOD_1 = &H5F
        HID_USAGE_SPORT_WOOD_3 = &H60
        HID_USAGE_SPORT_WOOD_5 = &H61
        HID_USAGE_SPORT_WOOD_7 = &H62
        HID_USAGE_SPORT_WOOD_9 = &H63
    End Enum

    '
    ' Game Controls Page (0x05)
    '
    Public Enum GameControlsPage As UShort
        HID_USAGE_GAME_UNDEFINED = &H0
        HID_USAGE_GAME_3D_GAME_CONTROLLER = &H1
        HID_USAGE_GAME_PINBALL_DEVICE = &H2
        HID_USAGE_GAME_GUN_DEVICE = &H3

        HID_USAGE_GAME_POINT_OF_VIEW = &H20
        HID_USAGE_GAME_TURN_RIGHT_LEFT = &H21
        HID_USAGE_GAME_PITCH_FORWARD_BACKWARD = &H22
        HID_USAGE_GAME_ROLL_RIGHT_LEFT = &H23
        HID_USAGE_GAME_MOVE_RIGHT_LEFT = &H24
        HID_USAGE_GAME_MOVE_FORWARD_BACKWARD = &H25
        HID_USAGE_GAME_MOVE_UP_DOWN = &H26
        HID_USAGE_GAME_LEAN_RIGHT_LEFT = &H27
        HID_USAGE_GAME_LEAN_FORWARD_BACKWARD = &H28
        HID_USAGE_GAME_HEIGHT_OF_POV = &H29
        HID_USAGE_GAME_FLIPPER = &H2A
        HID_USAGE_GAME_SECONDARY_FLIPPER = &H2B
        HID_USAGE_GAME_BUMP = &H2C
        HID_USAGE_GAME_NEW_GAME = &H2D
        HID_USAGE_GAME_SHOOT_BALL = &H2E
        HID_USAGE_GAME_PLAYER = &H2F
        HID_USAGE_GAME_GUN_BOLT = &H30
        HID_USAGE_GAME_GUN_CLIP = &H31
        HID_USAGE_GAME_GUN_SELECTOR = &H32
        HID_USAGE_GAME_GUN_SINGLE_SHOT = &H33
        HID_USAGE_GAME_GUN_BURST = &H34
        HID_USAGE_GAME_GUN_AUTOMATIC = &H35
        HID_USAGE_GAME_GUN_SAFETY = &H36
        HID_USAGE_GAME_GAMEPAD_FIRE_JUMP = &H37

        HID_USAGE_GAME_GAMEPAD_TRIGGER = &H39
    End Enum

    '
    ' Generic Device Controls Page (0x06)
    '
    Public Enum GenericDeviceControlsPage As UShort
        HID_USAGE_GENERIC_GAME_UNDEFINED = &H0
        HID_USAGE_GENERIC_GAME_BATTERY_STRENGTH = &H20
        HID_USAGE_GENERIC_GAME_WIRELESS_CHANNEL = &H21
        HID_USAGE_GENERIC_GAME_WIRELESS_ID = &H22
    End Enum

    '
    ' Keyboard/Keypad Page (0x07)
    '
    Public Enum KeyboardKeyPadPage As UShort
        ' Error "keys"
        HID_USAGE_KEYBOARD_NOEVENT = &H0
        HID_USAGE_KEYBOARD_ROLLOVER = &H1
        HID_USAGE_KEYBOARD_POSTFAIL = &H2
        HID_USAGE_KEYBOARD_UNDEFINED = &H3

        ' Letters
        HID_USAGE_KEYBOARD_aA = &H4
        HID_USAGE_KEYBOARD_bB = &H5
        HID_USAGE_KEYBOARD_cC = &H6
        HID_USAGE_KEYBOARD_dD = &H7
        HID_USAGE_KEYBOARD_eE = &H8
        HID_USAGE_KEYBOARD_fF = &H9
        HID_USAGE_KEYBOARD_gG = &HA
        HID_USAGE_KEYBOARD_hH = &HB
        HID_USAGE_KEYBOARD_iI = &HC
        HID_USAGE_KEYBOARD_jJ = &HD
        HID_USAGE_KEYBOARD_kK = &HE
        HID_USAGE_KEYBOARD_lL = &HF
        HID_USAGE_KEYBOARD_mM = &H10
        HID_USAGE_KEYBOARD_nN = &H11
        HID_USAGE_KEYBOARD_oO = &H12
        HID_USAGE_KEYBOARD_pP = &H13
        HID_USAGE_KEYBOARD_qQ = &H14
        HID_USAGE_KEYBOARD_rR = &H15
        HID_USAGE_KEYBOARD_sS = &H16
        HID_USAGE_KEYBOARD_tT = &H17
        HID_USAGE_KEYBOARD_uU = &H18
        HID_USAGE_KEYBOARD_vV = &H19
        HID_USAGE_KEYBOARD_wW = &H1A
        HID_USAGE_KEYBOARD_xX = &H1B
        HID_USAGE_KEYBOARD_yY = &H1C
        HID_USAGE_KEYBOARD_zZ = &H1D

        ' Numbers
        HID_USAGE_KEYBOARD_ONE = &H1E
        ' or !
        HID_USAGE_KEYBOARD_TWO = &H1F
        ' or @
        HID_USAGE_KEYBOARD_THREE = &H20
        ' or 
        HID_USAGE_KEYBOARD_FOUR = &H21
        ' or &h
        HID_USAGE_KEYBOARD_FIVE = &H22
        ' or %
        HID_USAGE_KEYBOARD_SIX = &H23
        ' or ^
        HID_USAGE_KEYBOARD_SEVEN = &H24
        ' or &
        HID_USAGE_KEYBOARD_EIGHT = &H25
        ' or *
        HID_USAGE_KEYBOARD_NINE = &H26
        ' or (
        HID_USAGE_KEYBOARD_ZERO = &H27
        ' or )

        HID_USAGE_KEYBOARD_ENTER = &H28
        ' RETURN is another key
        HID_USAGE_KEYBOARD_ESCAPE = &H29
        HID_USAGE_KEYBOARD_BACKSPACE = &H2A
        ' Delete left char
        HID_USAGE_KEYBOARD_TAB = &H2B
        HID_USAGE_KEYBOARD_SPACE = &H2C
        HID_USAGE_KEYBOARD_MINUS = &H2D
        ' or _
        HID_USAGE_KEYBOARD_EQUAL = &H2E
        ' or +
        HID_USAGE_KEYBOARD_LSQBRACKET = &H2F
        ' or {
        HID_USAGE_KEYBOARD_RSQBRACKET = &H30
        ' or }
        HID_USAGE_KEYBOARD_BACKSLASH = &H31
        ' or |
        HID_USAGE_KEYBOARD_HASHMARK2 = &H32
        ' or ~ Non US Key
        HID_USAGE_KEYBOARD_SEMICOLON = &H33
        HID_USAGE_KEYBOARD_APOSTROPH = &H34
        ' or :
        HID_USAGE_KEYBOARD_GRAVEACCENT = &H35
        ' or Tilde
        HID_USAGE_KEYBOARD_COMMA = &H36
        ' or <
        HID_USAGE_KEYBOARD_DOT = &H37
        ' or >
        HID_USAGE_KEYBOARD_SLASH = &H38
        ' or ?

        HID_USAGE_KEYBOARD_CAPS_LOCK = &H39

        ' Function keys
        HID_USAGE_KEYBOARD_F1 = &H3A
        HID_USAGE_KEYBOARD_F2 = &H3B
        HID_USAGE_KEYBOARD_F3 = &H3C
        HID_USAGE_KEYBOARD_F4 = &H3D
        HID_USAGE_KEYBOARD_F5 = &H3E
        HID_USAGE_KEYBOARD_F6 = &H3F
        HID_USAGE_KEYBOARD_F7 = &H40
        HID_USAGE_KEYBOARD_F8 = &H41
        HID_USAGE_KEYBOARD_F9 = &H42
        HID_USAGE_KEYBOARD_F10 = &H43
        HID_USAGE_KEYBOARD_F11 = &H44
        HID_USAGE_KEYBOARD_F12 = &H45

        HID_USAGE_KEYBOARD_PRINT_SCREEN = &H46
        HID_USAGE_KEYBOARD_SCROLL_LOCK = &H47

        HID_USAGE_KEYBOARD_PAUSE = &H48
        HID_USAGE_KEYBOARD_INSERT = &H49
        HID_USAGE_KEYBOARD_HOME = &H4A
        HID_USAGE_KEYBOARD_PAGEUP = &H4B
        HID_USAGE_KEYBOARD_DELETE = &H4C
        HID_USAGE_KEYBOARD_END = &H4D
        HID_USAGE_KEYBOARD_PAGEDOWN = &H4E
        HID_USAGE_KEYBOARD_RIGHT = &H4F
        HID_USAGE_KEYBOARD_LEFT = &H50
        HID_USAGE_KEYBOARD_DOWN = &H51
        HID_USAGE_KEYBOARD_UP = &H52

        HID_USAGE_KEYPAD_NUM_LOCK = &H53
        HID_USAGE_KEYPAD_SLASH = &H54
        HID_USAGE_KEYPAD_STAR = &H55
        HID_USAGE_KEYPAD_MINUS = &H56
        HID_USAGE_KEYPAD_PLUS = &H57
        HID_USAGE_KEYPAD_ENTER = &H58
        HID_USAGE_KEYPAD_ONE = &H59
        HID_USAGE_KEYPAD_TWO = &H5A
        HID_USAGE_KEYPAD_THREE = &H5B
        HID_USAGE_KEYPAD_FOUR = &H5C
        HID_USAGE_KEYPAD_FIVE = &H5D
        HID_USAGE_KEYPAD_SIX = &H5E
        HID_USAGE_KEYPAD_SEVEN = &H5F
        HID_USAGE_KEYPAD_EIGHT = &H60
        HID_USAGE_KEYPAD_NINE = &H61
        HID_USAGE_KEYPAD_ZERO = &H62
        HID_USAGE_KEYPAD_DOT = &H63

        HID_USAGE_KEYBOARD_BACKSLASH2 = &H64
        ' or | Non US key

        HID_USAGE_KEYBOARD_APPLICATION = &H65

        ' Keys not for Windows
        HID_USAGE_KEYBOARD_POWER = &H66
        HID_USAGE_KEYPAD_EQUAL2 = &H67

        ' Keys not for Windows
        HID_USAGE_KEYBOARD_F13 = &H68
        HID_USAGE_KEYBOARD_F14 = &H69
        HID_USAGE_KEYBOARD_F15 = &H6A
        HID_USAGE_KEYBOARD_F16 = &H6B
        HID_USAGE_KEYBOARD_F17 = &H6C
        HID_USAGE_KEYBOARD_F18 = &H6D
        HID_USAGE_KEYBOARD_F19 = &H6E
        HID_USAGE_KEYBOARD_F20 = &H6F
        HID_USAGE_KEYBOARD_F21 = &H70
        HID_USAGE_KEYBOARD_F22 = &H71
        HID_USAGE_KEYBOARD_F23 = &H72
        HID_USAGE_KEYBOARD_F24 = &H73
        HID_USAGE_KEYBOARD_EXECUTE = &H74
        HID_USAGE_KEYBOARD_HELP = &H75
        HID_USAGE_KEYBOARD_MENU = &H76
        HID_USAGE_KEYBOARD_SELECT = &H77
        HID_USAGE_KEYBOARD_STOP = &H78
        HID_USAGE_KEYBOARD_AGAIN = &H79
        HID_USAGE_KEYBOARD_UNDO = &H7A
        HID_USAGE_KEYBOARD_CUT = &H7B
        HID_USAGE_KEYBOARD_COPY = &H7C
        HID_USAGE_KEYBOARD_PASTE = &H7D
        HID_USAGE_KEYBOARD_FIND = &H7E
        HID_USAGE_KEYBOARD_MUTE = &H7F
        HID_USAGE_KEYBOARD_VOLUME_UP = &H80
        HID_USAGE_KEYBOARD_VOLUME_DOWN = &H81

        HID_USAGE_KEYBOARD_LOCKCAPS = &H82
        HID_USAGE_KEYBOARD_LOCKNUM = &H83
        HID_USAGE_KEYBOARD_LOCKSCROLL = &H84

        HID_USAGE_KEYPAD_COMMA = &H85
        HID_USAGE_KEYPAD_EQUALSIGN = &H86

        HID_USAGE_KEYBOARD_INATL1 = &H87
        HID_USAGE_KEYBOARD_INATL2 = &H88
        HID_USAGE_KEYBOARD_INATL3 = &H89
        HID_USAGE_KEYBOARD_INATL4 = &H8A
        HID_USAGE_KEYBOARD_INATL5 = &H8B
        HID_USAGE_KEYBOARD_INATL6 = &H8C
        HID_USAGE_KEYBOARD_INATL7 = &H8D
        HID_USAGE_KEYBOARD_INATL8 = &H8E
        HID_USAGE_KEYBOARD_INATL9 = &H8F
        HID_USAGE_KEYBOARD_LANG1 = &H90
        HID_USAGE_KEYBOARD_LANG2 = &H91
        HID_USAGE_KEYBOARD_LANG3 = &H92
        HID_USAGE_KEYBOARD_LANG4 = &H93
        HID_USAGE_KEYBOARD_LANG5 = &H94
        HID_USAGE_KEYBOARD_LANG6 = &H95
        HID_USAGE_KEYBOARD_LANG7 = &H96
        HID_USAGE_KEYBOARD_LANG8 = &H97
        HID_USAGE_KEYBOARD_LANG9 = &H98

        HID_USAGE_KEYBOARD_ALTERASE = &H99
        HID_USAGE_KEYBOARD_SYSREQ = &H9A
        HID_USAGE_KEYBOARD_CANCEL = &H9B
        HID_USAGE_KEYBOARD_CLEAR = &H9C
        HID_USAGE_KEYBOARD_PRIOR = &H9D
        HID_USAGE_KEYBOARD_RETURN = &H9E
        HID_USAGE_KEYBOARD_SEPARATOR = &H9F
        HID_USAGE_KEYBOARD_OUT = &HA0
        HID_USAGE_KEYBOARD_OPER = &HA1
        HID_USAGE_KEYBOARD_CLEAR_AGAIN = &HA2
        HID_USAGE_KEYBOARD_CRSEL = &HA3
        HID_USAGE_KEYBOARD_EXSEL = &HA4

        HID_USAGE_KEYPAD_HUNDREDS = &HB0
        HID_USAGE_KEYPAD_THOUSANDS = &HB1
        HID_USAGE_KEYPAD_THOUSANDS_SEP = &HB2
        HID_USAGE_KEYPAD_DECIMAL_SEP = &HB3
        HID_USAGE_KEYPAD_CURR_UNIT = &HB4
        HID_USAGE_KEYPAD_CURR_SUBUNIT = &HB5
        HID_USAGE_KEYPAD_LROUNDBRACKET = &HB6
        HID_USAGE_KEYPAD_RROUNDBRACKET = &HB7
        HID_USAGE_KEYPAD_LCURLYBRACKET = &HB8
        HID_USAGE_KEYPAD_RCURLYBRACKET = &HB9
        HID_USAGE_KEYPAD_TABULATOR = &HBA
        HID_USAGE_KEYPAD_BACKSPACE = &HBB
        HID_USAGE_KEYPAD_A = &HBC
        HID_USAGE_KEYPAD_B = &HBD
        HID_USAGE_KEYPAD_C = &HBE
        HID_USAGE_KEYPAD_D = &HBF
        HID_USAGE_KEYPAD_E = &HC0
        HID_USAGE_KEYPAD_F = &HC1
        HID_USAGE_KEYPAD_XOR = &HC2
        HID_USAGE_KEYPAD_CIRCUMFLEX = &HC3
        HID_USAGE_KEYPAD_PERCENT = &HC4
        HID_USAGE_KEYPAD_BIGGER_THAN = &HC5
        HID_USAGE_KEYPAD_LESS_THAN = &HC6
        HID_USAGE_KEYPAD_BINARY_AND = &HC7
        HID_USAGE_KEYPAD_LOGICAL_AND = &HC8
        HID_USAGE_KEYPAD_BINARY_OR = &HC9
        HID_USAGE_KEYPAD_LOGICAL_OR = &HCA
        HID_USAGE_KEYPAD_COLON = &HCB
        HID_USAGE_KEYPAD_HASHMARK = &HCC
        HID_USAGE_KEYPAD_SPACE = &HCD
        HID_USAGE_KEYPAD_AT = &HCE
        HID_USAGE_KEYPAD_EXCLAMATION = &HCF
        HID_USAGE_KEYPAD_MEM_STORE = &HD0
        HID_USAGE_KEYPAD_MEM_RECALL = &HD1
        HID_USAGE_KEYPAD_MEM_CLEAR = &HD2
        HID_USAGE_KEYPAD_MEM_ADD = &HD3
        HID_USAGE_KEYPAD_MEM_SUBTRACT = &HD4
        HID_USAGE_KEYPAD_MEM_MULTIPLY = &HD5
        HID_USAGE_KEYPAD_MEM_DIVIDE = &HD6
        HID_USAGE_KEYPAD_PLUS_MINUS = &HD7
        HID_USAGE_KEYPAD_CLEAR = &HD8
        HID_USAGE_KEYPAD_CLEAR_ENTRY = &HD9
        HID_USAGE_KEYPAD_BINARY = &HDA
        HID_USAGE_KEYPAD_OCTAL = &HDB
        HID_USAGE_KEYPAD_DECIMAL = &HDC
        HID_USAGE_KEYPAD_HEXADECIMAL = &HDD
        HID_USAGE_KEYPAD_RESERVED1 = &HDE
        HID_USAGE_KEYPAD_RESERVED2 = &HDF

        HID_USAGE_KEYBOARD_LCTRL = &HE0
        HID_USAGE_KEYBOARD_LSHFT = &HE1
        HID_USAGE_KEYBOARD_LALT = &HE2
        HID_USAGE_KEYBOARD_LGUI = &HE3
        HID_USAGE_KEYBOARD_RCTRL = &HE4
        HID_USAGE_KEYBOARD_RSHFT = &HE5
        HID_USAGE_KEYBOARD_RALT = &HE6
        HID_USAGE_KEYBOARD_RGUI = &HE7

        ' and hundreds more...
        ' &hE8 to &hFFFF are reserved in "USB HID Usage Tables 1.11" (Hut1_11.pdf)
    End Enum

    '
    ' LED Page (0x08)
    '
    Public Enum LEDPage As UShort
        HID_USAGE_LED_UNDEFINED = &H0
        HID_USAGE_LED_NUM_LOCK = &H1
        HID_USAGE_LED_CAPS_LOCK = &H2
        HID_USAGE_LED_SCROLL_LOCK = &H3
        HID_USAGE_LED_COMPOSE = &H4
        HID_USAGE_LED_KANA = &H5
        HID_USAGE_LED_POWER = &H6
        HID_USAGE_LED_SHIFT = &H7
        HID_USAGE_LED_DO_NOT_DISTURB = &H8
        HID_USAGE_LED_MUTE = &H9
        HID_USAGE_LED_TONE_ENABLE = &HA
        HID_USAGE_LED_HIGH_CUT_FILTER = &HB
        HID_USAGE_LED_LOW_CUT_FILTER = &HC
        HID_USAGE_LED_EQUALIZER_ENABLE = &HD
        HID_USAGE_LED_SOUND_FIELD_ON = &HE
        HID_USAGE_LED_SURROUND_FIELD_ON = &HF
        HID_USAGE_LED_REPEAT = &H10
        HID_USAGE_LED_STEREO = &H11
        HID_USAGE_LED_SAMPLING_RATE_DETECT = &H12
        HID_USAGE_LED_SPINNING = &H13
        HID_USAGE_LED_CAV = &H14
        HID_USAGE_LED_CLV = &H15
        HID_USAGE_LED_RECORDING_FORMAT_DET = &H16
        HID_USAGE_LED_OFF_HOOK = &H17
        HID_USAGE_LED_RING = &H18
        HID_USAGE_LED_MESSAGE_WAITING = &H19
        HID_USAGE_LED_DATA_MODE = &H1A
        HID_USAGE_LED_BATTERY_OPERATION = &H1B
        HID_USAGE_LED_BATTERY_OK = &H1C
        HID_USAGE_LED_BATTERY_LOW = &H1D
        HID_USAGE_LED_SPEAKER = &H1E
        HID_USAGE_LED_HEAD_SET = &H1F
        HID_USAGE_LED_HOLD = &H20
        HID_USAGE_LED_MICROPHONE = &H21
        HID_USAGE_LED_COVERAGE = &H22
        HID_USAGE_LED_NIGHT_MODE = &H23
        HID_USAGE_LED_SEND_CALLS = &H24
        HID_USAGE_LED_CALL_PICKUP = &H25
        HID_USAGE_LED_CONFERENCE = &H26
        HID_USAGE_LED_STAND_BY = &H27
        HID_USAGE_LED_CAMERA_ON = &H28
        HID_USAGE_LED_CAMERA_OFF = &H29
        HID_USAGE_LED_ON_LINE = &H2A
        HID_USAGE_LED_OFF_LINE = &H2B
        HID_USAGE_LED_BUSY = &H2C
        HID_USAGE_LED_READY = &H2D
        HID_USAGE_LED_PAPER_OUT = &H2E
        HID_USAGE_LED_PAPER_JAM = &H2F
        HID_USAGE_LED_REMOTE = &H30
        HID_USAGE_LED_FORWARD = &H31
        HID_USAGE_LED_REVERSE = &H32
        HID_USAGE_LED_STOP = &H33
        HID_USAGE_LED_REWIND = &H34
        HID_USAGE_LED_FAST_FORWARD = &H35
        HID_USAGE_LED_PLAY = &H36
        HID_USAGE_LED_PAUSE = &H37
        HID_USAGE_LED_RECORD = &H38
        HID_USAGE_LED_ERROR = &H39
        HID_USAGE_LED_SELECTED_INDICATOR = &H3A
        HID_USAGE_LED_IN_USE_INDICATOR = &H3B
        HID_USAGE_LED_MULTI_MODE_INDICATOR = &H3C
        HID_USAGE_LED_INDICATOR_ON = &H3D
        HID_USAGE_LED_INDICATOR_FLASH = &H3E
        HID_USAGE_LED_INDICATOR_SLOW_BLINK = &H3F
        HID_USAGE_LED_INDICATOR_FAST_BLINK = &H40
        HID_USAGE_LED_INDICATOR_OFF = &H41
        HID_USAGE_LED_FLASH_ON_TIME = &H42
        HID_USAGE_LED_SLOW_BLINK_ON_TIME = &H43
        HID_USAGE_LED_SLOW_BLINK_OFF_TIME = &H44
        HID_USAGE_LED_FAST_BLINK_ON_TIME = &H45
        HID_USAGE_LED_FAST_BLINK_OFF_TIME = &H46
        HID_USAGE_LED_INDICATOR_COLOR = &H47
        HID_USAGE_LED_RED = &H48
        HID_USAGE_LED_GREEN = &H49
        HID_USAGE_LED_AMBER = &H4A
        HID_USAGE_LED_GENERIC_INDICATOR = &H4B
        HID_USAGE_LED_SYSTEM_SUSPEND = &H4C
        HID_USAGE_LED_EXTERNAL_POWER = &H4D
    End Enum

    '
    '  Button Page (0x09)
    '
    '  There is no need to label these usages.
    '
    Public Enum ButtonPage As UShort
        HID_USAGE_BUTTON_NO_BUTTON = &H0
        ' Usage 1..65535 is the button number
    End Enum

    '
    '  Ordinal Page (0x0A)
    '
    '  There is no need to label these usages.
    '
    Public Enum OrdinalPage As UShort
        HID_USAGE_ORDINAL_RESERVED = &H0
        ' Usage 1..65535 is the ordinal number
    End Enum

    '
    '  Telephony Device Page (0x0B)
    '
    Public Enum TelephonyDevicePage As UShort
        HID_USAGE_TELEPHONY_UNDEFINED = &H0
        HID_USAGE_TELEPHONY_PHONE = &H1
        HID_USAGE_TELEPHONY_ANSWERING_MACHINE = &H2
        HID_USAGE_TELEPHONY_MESSAGE_CONTROLS = &H3
        HID_USAGE_TELEPHONY_HANDSET = &H4
        HID_USAGE_TELEPHONY_HEADSET = &H5
        HID_USAGE_TELEPHONY_KEYPAD = &H6
        HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON = &H7

        HID_USAGE_TELEPHONY_HOOK_SWITCH = &H20
        HID_USAGE_TELEPHONY_FLASH = &H21
        HID_USAGE_TELEPHONY_FEATURE = &H22
        HID_USAGE_TELEPHONY_HOLD = &H23
        HID_USAGE_TELEPHONY_REDIAL = &H24
        HID_USAGE_TELEPHONY_TRANSFER = &H25
        HID_USAGE_TELEPHONY_DROP = &H26
        HID_USAGE_TELEPHONY_PARK = &H27
        HID_USAGE_TELEPHONY_FORWARD_CALLS = &H28
        HID_USAGE_TELEPHONY_ALTERNATE_FUNCTION = &H29
        HID_USAGE_TELEPHONY_LINE = &H2A
        HID_USAGE_TELEPHONY_SPEAKER_PHONE = &H2B
        HID_USAGE_TELEPHONY_CONFERENCE = &H2C
        HID_USAGE_TELEPHONY_RING_ENABLE = &H2D
        HID_USAGE_TELEPHONY_RING_SELECT = &H2E
        HID_USAGE_TELEPHONY_PHONE_MUTE = &H2F
        HID_USAGE_TELEPHONY_CALLER_ID = &H30
        HID_USAGE_TELEPHONY_SEND = &H31

        HID_USAGE_TELEPHONY_SPEED_DIAL = &H50
        HID_USAGE_TELEPHONY_STORE_NUMBER = &H51
        HID_USAGE_TELEPHONY_RECALL_NUMBER = &H52
        HID_USAGE_TELEPHONY_PHONE_DIRECTORY = &H53

        HID_USAGE_TELEPHONY_VOICE_MAIL = &H70
        HID_USAGE_TELEPHONY_SCREEN_CALLS = &H71
        HID_USAGE_TELEPHONY_DO_NOT_DISTURB = &H72
        HID_USAGE_TELEPHONY_MESSAGE = &H73
        HID_USAGE_TELEPHONY_ANSWER_ON_OFF = &H74

        HID_USAGE_TELEPHONY_INSIDE_DIAL_TONE = &H90
        HID_USAGE_TELEPHONY_OUTSIDE_DIAL_TONE = &H91
        HID_USAGE_TELEPHONY_INSIDE_RING_TONE = &H92
        HID_USAGE_TELEPHONY_OUTSIDE_RING_TONE = &H93
        HID_USAGE_TELEPHONY_PRIORITY_RING_TONE = &H94
        HID_USAGE_TELEPHONY_INSIDE_RINGBACK = &H95
        HID_USAGE_TELEPHONY_PRIORITY_RINGBACK = &H96
        HID_USAGE_TELEPHONY_LINE_BUSY_TONE = &H97
        HID_USAGE_TELEPHONY_REORDER_TONE = &H98
        HID_USAGE_TELEPHONY_CALL_WAITING_TONE = &H99
        HID_USAGE_TELEPHONY_CONFIRMATION_TONE_1 = &H9A
        HID_USAGE_TELEPHONY_CONFIRMATION_TONE_2 = &H9B
        HID_USAGE_TELEPHONY_TONES_OFF = &H9C
        HID_USAGE_TELEPHONY_OUTSIDE_RINGBACK = &H9D
        HID_USAGE_TELEPHONY_RINGER = &H9E

        HID_USAGE_TELEPHONY_KEY_0 = &HB0
        HID_USAGE_TELEPHONY_KEY_1 = &HB1
        HID_USAGE_TELEPHONY_KEY_2 = &HB2
        HID_USAGE_TELEPHONY_KEY_3 = &HB3
        HID_USAGE_TELEPHONY_KEY_4 = &HB4
        HID_USAGE_TELEPHONY_KEY_5 = &HB5
        HID_USAGE_TELEPHONY_KEY_6 = &HB6
        HID_USAGE_TELEPHONY_KEY_7 = &HB7
        HID_USAGE_TELEPHONY_KEY_8 = &HB8
        HID_USAGE_TELEPHONY_KEY_9 = &HB9
        HID_USAGE_TELEPHONY_KEY_STAR = &HBA
        HID_USAGE_TELEPHONY_KEY_POUND = &HBB
        HID_USAGE_TELEPHONY_KEY_A = &HBC
        HID_USAGE_TELEPHONY_KEY_B = &HBD
        HID_USAGE_TELEPHONY_KEY_C = &HBE
        HID_USAGE_TELEPHONY_KEY_D = &HBF

        ' &hC0 to &hFFFF are reserved in "USB HID Usage Tables 1.11" (Hut1_11.pdf)
    End Enum

    '
    ' Consumer Page (0x0C)
    '
    Public Enum ConsumerPage As UShort
        HID_USAGE_CONSUMER_UNDEFINED = &H0
        HID_USAGE_CONSUMER_CONSUMER_CONTROL = &H1
        HID_USAGE_CONSUMER_NUMERIC_KEY_PAD = &H2
        HID_USAGE_CONSUMER_PROGRAMMABLE_BUTTONS = &H3
        HID_USAGE_CONSUMER_MICROPHONE = &H4
        HID_USAGE_CONSUMER_HEADPHONE = &H5
        HID_USAGE_CONSUMER_GRAPHIC_EQUALIZER = &H6

        HID_USAGE_CONSUMER_PLUS_10 = &H20
        HID_USAGE_CONSUMER_PLUS_100 = &H21
        HID_USAGE_CONSUMER_AM_PM = &H22

        HID_USAGE_CONSUMER_POWER = &H30
        HID_USAGE_CONSUMER_RESET = &H31
        HID_USAGE_CONSUMER_SLEEP = &H32
        HID_USAGE_CONSUMER_SLEEP_AFTER = &H33
        HID_USAGE_CONSUMER_SLEEP_MODE = &H34
        HID_USAGE_CONSUMER_ILLUMINATION = &H35
        HID_USAGE_CONSUMER_FUNCTION_BUTTONS = &H36

        HID_USAGE_CONSUMER_MENU = &H40
        HID_USAGE_CONSUMER_MENU_PICK = &H41
        HID_USAGE_CONSUMER_MENU_UP = &H42
        HID_USAGE_CONSUMER_MENU_DOWN = &H43
        HID_USAGE_CONSUMER_MENU_LEFT = &H44
        HID_USAGE_CONSUMER_MENU_RIGHT = &H45
        HID_USAGE_CONSUMER_MENU_ESCAPE = &H46
        HID_USAGE_CONSUMER_MENU_VALUE_INCREASE = &H47
        HID_USAGE_CONSUMER_MENU_VALUE_DECREASE = &H48

        HID_USAGE_CONSUMER_DATA_ON_SCREEN = &H60
        HID_USAGE_CONSUMER_CLOSED_CAPTION = &H61
        HID_USAGE_CONSUMER_CLOSED_CAPTION_SELECT = &H62
        HID_USAGE_CONSUMER_VCR_TV = &H63
        HID_USAGE_CONSUMER_BROADCAST_MODE = &H64
        HID_USAGE_CONSUMER_SNAPSHOT = &H65
        HID_USAGE_CONSUMER_STILL = &H66

        HID_USAGE_CONSUMER_SELECTION = &H80
        HID_USAGE_CONSUMER_ASSIGN_SELECTION = &H81
        HID_USAGE_CONSUMER_MODE_STEP = &H82
        HID_USAGE_CONSUMER_RECALL_LAST = &H83
        HID_USAGE_CONSUMER_ENTER_CHANNEL = &H84
        HID_USAGE_CONSUMER_ORDER_MOVIE = &H85
        HID_USAGE_CONSUMER_CHANNEL = &H86
        HID_USAGE_CONSUMER_MEDIA_SELECTION = &H87
        HID_USAGE_CONSUMER_MEDIA_SELECT_COMPUTER = &H88
        HID_USAGE_CONSUMER_MEDIA_SELECT_TV = &H89
        HID_USAGE_CONSUMER_MEDIA_SELECT_WWW = &H8A
        HID_USAGE_CONSUMER_MEDIA_SELECT_DVD = &H8B
        HID_USAGE_CONSUMER_MEDIA_SELECT_TELEPHONE = &H8C
        HID_USAGE_CONSUMER_MEDIA_SELECT_PROGRAM_GUIDE = &H8D
        HID_USAGE_CONSUMER_MEDIA_SELECT_VIDEO_PHONE = &H8E
        HID_USAGE_CONSUMER_MEDIA_SELECT_GAMES = &H8F
        HID_USAGE_CONSUMER_MEDIA_SELECT_MESSAGES = &H90
        HID_USAGE_CONSUMER_MEDIA_SELECT_CD = &H91
        HID_USAGE_CONSUMER_MEDIA_SELECT_VCR = &H92
        HID_USAGE_CONSUMER_MEDIA_SELECT_TUNER = &H93
        HID_USAGE_CONSUMER_QUIT = &H94
        HID_USAGE_CONSUMER_HELP = &H95
        HID_USAGE_CONSUMER_MEDIA_SELECT_TAPE = &H96
        HID_USAGE_CONSUMER_MEDIA_SELECT_CABLE = &H97
        HID_USAGE_CONSUMER_MEDIA_SELECT_SATELLITE = &H98
        HID_USAGE_CONSUMER_MEDIA_SELECT_SECURITY = &H99
        HID_USAGE_CONSUMER_MEDIA_SELECT_HOME = &H9A
        HID_USAGE_CONSUMER_MEDIA_SELECT_CALL = &H9B
        HID_USAGE_CONSUMER_CHANNEL_INCREMENT = &H9C
        HID_USAGE_CONSUMER_CHANNEL_DECREMENT = &H9D
        HID_USAGE_CONSUMER_MEDIA_SELECT_SAP = &H9E
        HID_USAGE_CONSUMER_RESERVED = &H9F
        HID_USAGE_CONSUMER_VCR_PLUS = &HA0
        HID_USAGE_CONSUMER_ONCE = &HA1
        HID_USAGE_CONSUMER_DAILY = &HA2
        HID_USAGE_CONSUMER_WEEKLY = &HA3
        HID_USAGE_CONSUMER_MONTHLY = &HA4

        HID_USAGE_CONSUMER_PLAY = &HB0
        HID_USAGE_CONSUMER_PAUSE = &HB1
        HID_USAGE_CONSUMER_RECORD = &HB2
        HID_USAGE_CONSUMER_FAST_FORWARD = &HB3
        HID_USAGE_CONSUMER_REWIND = &HB4
        HID_USAGE_CONSUMER_SCAN_NEXT_TRACK = &HB5
        HID_USAGE_CONSUMER_SCAN_PREV_TRACK = &HB6
        HID_USAGE_CONSUMER_STOP = &HB7
        HID_USAGE_CONSUMER_EJECT = &HB8
        HID_USAGE_CONSUMER_RANDOM_PLAY = &HB9
        HID_USAGE_CONSUMER_SELECT_DISC = &HBA
        HID_USAGE_CONSUMER_ENTER_DISC = &HBB
        HID_USAGE_CONSUMER_REPEAT = &HBC
        HID_USAGE_CONSUMER_TRACKING = &HBD
        HID_USAGE_CONSUMER_TRACK_NORMAL = &HBE
        HID_USAGE_CONSUMER_SLOW_TRACKING = &HBF
        HID_USAGE_CONSUMER_FRAME_FORWARD = &HC0
        HID_USAGE_CONSUMER_FRAME_BACK = &HC1
        HID_USAGE_CONSUMER_MARK = &HC2
        HID_USAGE_CONSUMER_CLEAR_MARK = &HC3
        HID_USAGE_CONSUMER_REPEAT_FROM_MARK = &HC4
        HID_USAGE_CONSUMER_RETURN_TO_MARK = &HC5
        HID_USAGE_CONSUMER_SEARCH_MARK_FORWARD = &HC6
        HID_USAGE_CONSUMER_SEARCK_MARK_BACKWARDS = &HC7
        HID_USAGE_CONSUMER_COUNTER_RESET = &HC8
        HID_USAGE_CONSUMER_SHOW_COUNTER = &HC9
        HID_USAGE_CONSUMER_TRACKING_INCREMENT = &HCA
        HID_USAGE_CONSUMER_TRACKING_DECREMENT = &HCB
        HID_USAGE_CONSUMER_STOP_EJECT = &HCC
        HID_USAGE_CONSUMER_PLAY_PAUSE = &HCD
        HID_USAGE_CONSUMER_PLAY_SKIP = &HCE

        HID_USAGE_CONSUMER_VOLUME = &HE0
        HID_USAGE_CONSUMER_BALANCE = &HE1
        HID_USAGE_CONSUMER_MUTE = &HE2
        HID_USAGE_CONSUMER_BASS = &HE3
        HID_USAGE_CONSUMER_TREBLE = &HE4
        HID_USAGE_CONSUMER_BASS_BOOST = &HE5
        HID_USAGE_CONSUMER_SURROUND_MODE = &HE6
        HID_USAGE_CONSUMER_LOUDNESS = &HE7
        HID_USAGE_CONSUMER_MPX = &HE8
        HID_USAGE_CONSUMER_VOLUME_INCREMENT = &HE9
        HID_USAGE_CONSUMER_VOLUME_DECREMENT = &HEA

        HID_USAGE_CONSUMER_SPEED_SELECT = &HF0
        HID_USAGE_CONSUMER_PLAYBACK_SPEED = &HF1
        HID_USAGE_CONSUMER_STANDARD_PLAY = &HF2
        HID_USAGE_CONSUMER_LONG_PLAY = &HF3
        HID_USAGE_CONSUMER_EXTENDED_PLAY = &HF4
        HID_USAGE_CONSUMER_SLOW = &HF5

        HID_USAGE_CONSUMER_FAN_ENABLE = &H100
        HID_USAGE_CONSUMER_FAN_SPEED = &H101
        HID_USAGE_CONSUMER_LIGHT_ENABLE = &H102
        HID_USAGE_CONSUMER_LIGHT_ILLUMINATION_LEVEL = &H103
        HID_USAGE_CONSUMER_CLIMATE_CONTROL_ENABLE = &H104
        HID_USAGE_CONSUMER_ROOM_TEMPERATURE = &H105
        HID_USAGE_CONSUMER_SECURITY_ENABLE = &H106
        HID_USAGE_CONSUMER_FIRE_ALARM = &H107
        HID_USAGE_CONSUMER_POLICE_ALARM = &H108
        HID_USAGE_CONSUMER_PROXIMITY = &H109
        HID_USAGE_CONSUMER_MOTION = &H10A
        HID_USAGE_CONSUMER_DURESS_ALARM = &H10B
        HID_USAGE_CONSUMER_HOLDUP_ALARM = &H10C
        HID_USAGE_CONSUMER_MEDICAL_ALARM = &H10D

        HID_USAGE_CONSUMER_BALANCE_RIGHT = &H150
        HID_USAGE_CONSUMER_BALANCE_LEFT = &H151
        HID_USAGE_CONSUMER_BASS_INCREMENT = &H152
        HID_USAGE_CONSUMER_BASS_DECREMENT = &H153
        HID_USAGE_CONSUMER_TREBLE_INCREMENT = &H154
        HID_USAGE_CONSUMER_TREBLE_DECREMENT = &H155

        HID_USAGE_CONSUMER_SPEAKER_SYSTEM = &H160
        HID_USAGE_CONSUMER_CHANNEL_LEFT = &H161
        HID_USAGE_CONSUMER_CHANNEL_RIGHT = &H162
        HID_USAGE_CONSUMER_CHANNEL_CENTER = &H163
        HID_USAGE_CONSUMER_CHANNEL_FRONT = &H164
        HID_USAGE_CONSUMER_CHANNEL_CENTER_FRONT = &H165
        HID_USAGE_CONSUMER_CHANNEL_SIDE = &H166
        HID_USAGE_CONSUMER_CHANNEL_SURROUND = &H167
        HID_USAGE_CONSUMER_CHANNEL_LOW_FREQ_ENH = &H168
        HID_USAGE_CONSUMER_CHANNEL_TOP = &H169
        HID_USAGE_CONSUMER_CHANNEL_UNKNOWN = &H16A

        HID_USAGE_CONSUMER_SUB_CHANNEL = &H170
        HID_USAGE_CONSUMER_SUB_CHANNEL_INCREMENT = &H171
        HID_USAGE_CONSUMER_SUB_CHANNEL_DECREMENT = &H172
        HID_USAGE_CONSUMER_ALTERNATE_AUDIO_INCREMENT = &H173
        HID_USAGE_CONSUMER_ALTERNATE_AUDIO_DECREMENT = &H174

        HID_USAGE_CONSUMER_APP_LAUNCH_BUTTONS = &H180
        HID_USAGE_CONSUMER_AL_LAUNCH_BUTTON_CONFIG_TOOL = &H181
        HID_USAGE_CONSUMER_AL_PROG_BUTTON_CONFIG = &H182
        HID_USAGE_CONSUMER_AL_CONSUMER_CONTROL_CONFIG = &H183
        HID_USAGE_CONSUMER_AL_WORD_PROCESSOR = &H184
        HID_USAGE_CONSUMER_AL_TEXT_EDITOR = &H185
        HID_USAGE_CONSUMER_AL_SPREADSHEET = &H186
        HID_USAGE_CONSUMER_AL_GRAPHICS_EDITOR = &H187
        HID_USAGE_CONSUMER_AL_PRESENTATION_APP = &H188
        HID_USAGE_CONSUMER_AL_DATABASE_APP = &H189
        HID_USAGE_CONSUMER_AL_EMAIL_READER = &H18A
        HID_USAGE_CONSUMER_AL_NEWSREADER = &H18B
        HID_USAGE_CONSUMER_AL_VOICEMAIL = &H18C
        HID_USAGE_CONSUMER_AL_CONTACTS_ADDESSBOOK = &H18D
        HID_USAGE_CONSUMER_AL_CALENDAR_SCHEDULE = &H18E
        HID_USAGE_CONSUMER_AL_TASK_PROJECT_MANAGER = &H18F
        HID_USAGE_CONSUMER_AL_LOG_JOURNAL_TIMECARD = &H190
        HID_USAGE_CONSUMER_AL_CHECKBOOK_FINANCE = &H191
        HID_USAGE_CONSUMER_AL_CALCULATOR = &H192
        HID_USAGE_CONSUMER_AL_AV_CAPTURE_PLAYBACK = &H193
        HID_USAGE_CONSUMER_AL_LOCAL_MACHINE_BROWSER = &H194
        HID_USAGE_CONSUMER_AL_LAN_WAN_BROWSER = &H195
        HID_USAGE_CONSUMER_AL_INTERNET_BROWSER = &H196
        HID_USAGE_CONSUMER_AL_REMOTE_NETWORKING_ISP_CONNECT = &H197
        HID_USAGE_CONSUMER_AL_NETWORK_CONFERENCE = &H198
        HID_USAGE_CONSUMER_AL_NETWORK_CHAT = &H199
        HID_USAGE_CONSUMER_AL_TELEPHONY_DIALER = &H19A
        HID_USAGE_CONSUMER_AL_LOGON = &H19B
        HID_USAGE_CONSUMER_AL_LOGOFF = &H19C
        HID_USAGE_CONSUMER_AL_LOGON_LOGOFF = &H19D
        HID_USAGE_CONSUMER_AL_TERMINAL_LOCK_SCREENSAVER = &H19E
        HID_USAGE_CONSUMER_AL_CONTROL_PANEL = &H19F
        HID_USAGE_CONSUMER_AL_COMMAND_LINE_PROCESSOR_RUN = &H1A0
        HID_USAGE_CONSUMER_AL_PROCESS_TASK_MANAGER = &H1A1
        HID_USAGE_CONSUMER_AL_SELECT_TASK_APP = &H1A2
        HID_USAGE_CONSUMER_AL_NEXT_TASK_APP = &H1A3
        HID_USAGE_CONSUMER_AL_PREV_TASK_APP = &H1A4
        HID_USAGE_CONSUMER_AL_PREEMPTIVE_HALT_TASK_APP = &H1A5
        HID_USAGE_CONSUMER_AL_INTEGRATED_HELP_CENTER = &H1A6
        HID_USAGE_CONSUMER_AL_DOCUMENTS = &H1A7
        HID_USAGE_CONSUMER_AL_THESAURUS = &H1A8
        HID_USAGE_CONSUMER_AL_DICTIONARY = &H1A9
        HID_USAGE_CONSUMER_AL_DESKTOP = &H1AA
        HID_USAGE_CONSUMER_AL_SPELL_CHECK = &H1AB
        HID_USAGE_CONSUMER_AL_GRAMMAR_CHECK = &H1AC
        HID_USAGE_CONSUMER_AL_WIRELESS_STATUS = &H1AD
        HID_USAGE_CONSUMER_AL_KEYBOARD_LAYOUT = &H1AE
        HID_USAGE_CONSUMER_AL_VIRUS_PROTECTION = &H1AF
        HID_USAGE_CONSUMER_AL_ENCRYPTION = &H1B0
        HID_USAGE_CONSUMER_AL_SCREENSAVER = &H1B1
        HID_USAGE_CONSUMER_AL_ALARMS = &H1B2
        HID_USAGE_CONSUMER_AL_CLOCK = &H1B3
        HID_USAGE_CONSUMER_AL_FILE_BROWSER = &H1B4
        HID_USAGE_CONSUMER_AL_POWER_STATUS = &H1B5

        HID_USAGE_CONSUMER_GENERIC_GUI_APP_CONTROLS = &H200
        HID_USAGE_CONSUMER_AC_NEW = &H201
        HID_USAGE_CONSUMER_AC_OPEN = &H202
        HID_USAGE_CONSUMER_AC_CLOSE = &H203
        HID_USAGE_CONSUMER_AC_EXIT = &H204
        HID_USAGE_CONSUMER_AC_MAXIMIZE = &H205
        HID_USAGE_CONSUMER_AC_MINIMIZE = &H206
        HID_USAGE_CONSUMER_AC_SAVE = &H207
        HID_USAGE_CONSUMER_AC_PRINT = &H208
        HID_USAGE_CONSUMER_AC_PROPERTIES = &H209

        HID_USAGE_CONSUMER_AC_UNDO = &H21A
        HID_USAGE_CONSUMER_AC_COPY = &H21B
        HID_USAGE_CONSUMER_AC_CUT = &H21C
        HID_USAGE_CONSUMER_AC_PASTE = &H21D
        HID_USAGE_CONSUMER_AC_SELECT_ALL = &H21E
        HID_USAGE_CONSUMER_AC_FIND = &H21F
        HID_USAGE_CONSUMER_AC_FIND_AND_REPLACE = &H220
        HID_USAGE_CONSUMER_AC_SEARCH = &H221
        HID_USAGE_CONSUMER_AC_GO_TO = &H222
        HID_USAGE_CONSUMER_AC_HOME = &H223
        HID_USAGE_CONSUMER_AC_BACK = &H224
        HID_USAGE_CONSUMER_AC_FORWARD = &H225
        HID_USAGE_CONSUMER_AC_STOP = &H226
        HID_USAGE_CONSUMER_AC_REFRESH = &H227
        HID_USAGE_CONSUMER_AC_PREV_LINK = &H228
        HID_USAGE_CONSUMER_AC_NEXT_LINK = &H229
        HID_USAGE_CONSUMER_AC_BOOKMARKS = &H22A
        HID_USAGE_CONSUMER_AC_HISTORY = &H22B
        HID_USAGE_CONSUMER_AC_SUBSCRIPTIONS = &H22C
        HID_USAGE_CONSUMER_AC_ZOOM_IN = &H22D
        HID_USAGE_CONSUMER_AC_ZOOM_OUT = &H22E
        HID_USAGE_CONSUMER_AC_ZOOM = &H22F
        HID_USAGE_CONSUMER_AC_FULL_SCREEN_VIEW = &H230
        HID_USAGE_CONSUMER_AC_NORMAL_VIEW = &H231
        HID_USAGE_CONSUMER_AC_VIEW_TOGGLE = &H232
        HID_USAGE_CONSUMER_AC_SCROLL_UP = &H233
        HID_USAGE_CONSUMER_AC_SCROLL_DOWN = &H234
        HID_USAGE_CONSUMER_AC_SCROLL = &H235
        HID_USAGE_CONSUMER_AC_PAN_LEFT = &H236
        HID_USAGE_CONSUMER_AC_PAN_RIGHT = &H237
        HID_USAGE_CONSUMER_AC_PAN = &H238
        HID_USAGE_CONSUMER_AC_NEW_WINDOW = &H239
        HID_USAGE_CONSUMER_AC_TILE_HORIZONTALLY = &H23A
        HID_USAGE_CONSUMER_AC_TILE_VERTICALLY = &H23B
        HID_USAGE_CONSUMER_AC_FORMAT = &H23C
        HID_USAGE_CONSUMER_AC_EDIT = &H23D
        HID_USAGE_CONSUMER_AC_BOLD = &H23E
        HID_USAGE_CONSUMER_AC_ITALICS = &H23F
        HID_USAGE_CONSUMER_AC_UNDERLINE = &H240
        HID_USAGE_CONSUMER_AC_STRIKETHROUGH = &H241
        HID_USAGE_CONSUMER_AC_SUBSCRIPT = &H242
        HID_USAGE_CONSUMER_AC_SUPERSCRIPT = &H243
        HID_USAGE_CONSUMER_AC_ALL_CAPS = &H244
        HID_USAGE_CONSUMER_AC_ROTATE = &H245
        HID_USAGE_CONSUMER_AC_RESIZE = &H246
        HID_USAGE_CONSUMER_AC_FLIP_HORIZONTAL = &H247
        HID_USAGE_CONSUMER_AC_FLIP_VERTICAL = &H248
        HID_USAGE_CONSUMER_AC_MIRROR_HORIZONTAL = &H249
        HID_USAGE_CONSUMER_AC_MIRROR_VERTICAL = &H24A
        HID_USAGE_CONSUMER_AC_FONT_SELECT = &H24B
        HID_USAGE_CONSUMER_AC_FONT_COLOR = &H24C
        HID_USAGE_CONSUMER_AC_FONT_SIZE = &H24D
        HID_USAGE_CONSUMER_AC_JUSTIFY_LEFT = &H24E
        HID_USAGE_CONSUMER_AC_JUSTIFY_CENTER_H = &H24F
        HID_USAGE_CONSUMER_AC_JUSTIFY_RIGHT = &H250
        HID_USAGE_CONSUMER_AC_JUSTIFY_BLOCK_H = &H251
        HID_USAGE_CONSUMER_AC_JUSTIFY_TOP = &H252
        HID_USAGE_CONSUMER_AC_JUSTIFY_CENTER_V = &H253
        HID_USAGE_CONSUMER_AC_JUSTIFY_BOTTOM = &H254
        HID_USAGE_CONSUMER_AC_JUSTIFY_BLOCK_V = &H255
        HID_USAGE_CONSUMER_AC_INDENT_DECREASE = &H256
        HID_USAGE_CONSUMER_AC_INDENT_INCREASE = &H257
        HID_USAGE_CONSUMER_AC_NUMBERED_LIST = &H258
        HID_USAGE_CONSUMER_AC_RESTART_NUMBERING = &H259
        HID_USAGE_CONSUMER_AC_BULLETED_LIST = &H25A
        HID_USAGE_CONSUMER_AC_PROMOTE = &H25B
        HID_USAGE_CONSUMER_AC_DEMOTE = &H25C
        HID_USAGE_CONSUMER_AC_YES = &H25D
        HID_USAGE_CONSUMER_AC_NO = &H25E
        HID_USAGE_CONSUMER_AC_CANCEL = &H25F
        HID_USAGE_CONSUMER_AC_CATALOG = &H260
        HID_USAGE_CONSUMER_AC_BUY_CHECKOUT = &H261
        HID_USAGE_CONSUMER_AC_ADD_TO_CART = &H262
        HID_USAGE_CONSUMER_AC_EXPAND = &H263
        HID_USAGE_CONSUMER_AC_EXPAND_ALL = &H264
        HID_USAGE_CONSUMER_AC_COLLAPSE = &H265
        HID_USAGE_CONSUMER_AC_COLLAPSE_ALL = &H266
        HID_USAGE_CONSUMER_AC_PRINT_PREVIEW = &H267
        HID_USAGE_CONSUMER_AC_PASTE_SPECIAL = &H268
        HID_USAGE_CONSUMER_AC_INSERT_MODE = &H269
        HID_USAGE_CONSUMER_AC_DELETE = &H26A
        HID_USAGE_CONSUMER_AC_LOCK = &H26B
        HID_USAGE_CONSUMER_AC_UNLOCK = &H26C
        HID_USAGE_CONSUMER_AC_PROTECT = &H26D
        HID_USAGE_CONSUMER_AC_UNPROTECT = &H26E
        HID_USAGE_CONSUMER_AC_ATTACH_COMMENT = &H26F
        HID_USAGE_CONSUMER_AC_DELETE_COMMENT = &H270
        HID_USAGE_CONSUMER_AC_VIEW_COMMENT = &H271
        HID_USAGE_CONSUMER_AC_SELECT_WORD = &H272
        HID_USAGE_CONSUMER_AC_SELECT_SENTENCE = &H273
        HID_USAGE_CONSUMER_AC_SELECT_PARAGRAPH = &H274
        HID_USAGE_CONSUMER_AC_SELECT_COLUMN = &H275
        HID_USAGE_CONSUMER_AC_SELECT_ROW = &H276
        HID_USAGE_CONSUMER_AC_SELECT_TABLE = &H277
        HID_USAGE_CONSUMER_AC_SELECT_OBJECT = &H278
        HID_USAGE_CONSUMER_AC_REDO_REPEAT = &H279
        HID_USAGE_CONSUMER_AC_SORT = &H27A
        HID_USAGE_CONSUMER_AC_SORT_ASCENDING = &H27B
        HID_USAGE_CONSUMER_AC_SORT_DESCENDING = &H27C
        HID_USAGE_CONSUMER_AC_FILTER = &H27D
        HID_USAGE_CONSUMER_AC_SET_CLOCK = &H27E
        HID_USAGE_CONSUMER_AC_VIEW_CLOCK = &H27F
        HID_USAGE_CONSUMER_AC_SELECT_TIME_ZONE = &H280
        HID_USAGE_CONSUMER_AC_EDIT_TIME_ZONES = &H281
        HID_USAGE_CONSUMER_AC_SET_ALARM = &H282
        HID_USAGE_CONSUMER_AC_CLEAR_ALARM = &H283
        HID_USAGE_CONSUMER_AC_SNOOZE_ALARM = &H284
        HID_USAGE_CONSUMER_AC_RESET_ALARM = &H285
        HID_USAGE_CONSUMER_AC_SYNCHRONIZE = &H286
        HID_USAGE_CONSUMER_AC_SEND_RECEIVE = &H287
        HID_USAGE_CONSUMER_AC_SEND_TO = &H288
        HID_USAGE_CONSUMER_AC_REPLY = &H289
        HID_USAGE_CONSUMER_AC_REPLY_ALL = &H28A
        HID_USAGE_CONSUMER_AC_FORWARD_MSG = &H28B
        HID_USAGE_CONSUMER_AC_SEND = &H28C
        HID_USAGE_CONSUMER_AC_ATTACH_FILE = &H28D
        HID_USAGE_CONSUMER_AC_UPLOAD = &H28E
        HID_USAGE_CONSUMER_AC_DOWNLOAD = &H28F
        HID_USAGE_CONSUMER_AC_SET_BORDERS = &H290
        HID_USAGE_CONSUMER_AC_INSERT_ROW = &H291
        HID_USAGE_CONSUMER_AC_INSERT_COLUMN = &H292
        HID_USAGE_CONSUMER_AC_INSERT_FILE = &H293
        HID_USAGE_CONSUMER_AC_INSERT_PICTURE = &H294
        HID_USAGE_CONSUMER_AC_INSERT_OBJECT = &H295
        HID_USAGE_CONSUMER_AC_INSERT_SYMBOL = &H296
        HID_USAGE_CONSUMER_AC_SAVE_AND_CLOSE = &H297
        HID_USAGE_CONSUMER_AC_RENAME = &H298
        HID_USAGE_CONSUMER_AC_MERGE = &H299
        HID_USAGE_CONSUMER_AC_SPLIT = &H29A
        HID_USAGE_CONSUMER_AC_DISTRIBUTE_HORIZONTALLY = &H29B
        HID_USAGE_CONSUMER_AC_DISTRIBUTE_VERTICALLY = &H29C

        ' (rom) &h29D to &hFFFF are reserved in "USB HID Usage Tables 1.11" (Hut1_11.pdf)
    End Enum

    '
    ' Digitizer Page (0x0D)
    '
    Public Enum DigitizerPage As UShort
        HID_USAGE_DIGITIZER_UNDEFINED = &H0
        HID_USAGE_DIGITIZER_DIGITIZER = &H1
        HID_USAGE_DIGITIZER_PEN = &H2
        HID_USAGE_DIGITIZER_LIGHT_PEN = &H3
        HID_USAGE_DIGITIZER_TOUCH_SCREEN = &H4
        HID_USAGE_DIGITIZER_TOUCH_PAD = &H5
        HID_USAGE_DIGITIZER_WHITE_BOARD = &H6
        HID_USAGE_DIGITIZER_COORDINATE_MEASURING_MACHINE = &H7
        HID_USAGE_DIGITIZER_3D_DIGITIZER = &H8
        HID_USAGE_DIGITIZER_STEREO_PLOTTER = &H9
        HID_USAGE_DIGITIZER_ARTICULATED_ARM = &HA
        HID_USAGE_DIGITIZER_ARMATURE = &HB
        HID_USAGE_DIGITIZER_MULTIPLE_POINT_DIGITIZER = &HC
        HID_USAGE_DIGITIZER_FREE_SPACE_WAND = &HD

        HID_USAGE_DIGITIZER_STYLUS = &H20
        HID_USAGE_DIGITIZER_PUCK = &H21
        HID_USAGE_DIGITIZER_FINGER = &H22

        HID_USAGE_DIGITIZER_TIP_PRESSURE = &H30
        HID_USAGE_DIGITIZER_BARREL_PRESSURE = &H31
        HID_USAGE_DIGITIZER_IN_RANGE = &H32
        HID_USAGE_DIGITIZER_TOUCH = &H33
        HID_USAGE_DIGITIZER_UNTOUCH = &H34
        HID_USAGE_DIGITIZER_TAP = &H35
        HID_USAGE_DIGITIZER_QUALITY = &H36
        HID_USAGE_DIGITIZER_DATA_VALID = &H37
        HID_USAGE_DIGITIZER_TRANSDUCER_INDEX = &H38
        HID_USAGE_DIGITIZER_TABLET_FUNCTION_KEYS = &H39
        HID_USAGE_DIGITIZER_PROGRAM_CHANGE_KEYS = &H3A
        HID_USAGE_DIGITIZER_BATTERY_STRENGTH = &H3B
        HID_USAGE_DIGITIZER_INVERT = &H3C
        HID_USAGE_DIGITIZER_X_TILT = &H3D
        HID_USAGE_DIGITIZER_Y_TILT = &H3E
        HID_USAGE_DIGITIZER_AZIMUTH = &H3F
        HID_USAGE_DIGITIZER_ALTITUDE = &H40
        HID_USAGE_DIGITIZER_TWIST = &H41
        HID_USAGE_DIGITIZER_TIP_SWITCH = &H42
        HID_USAGE_DIGITIZER_SECONDARY_TIP_SWITCH = &H43
        HID_USAGE_DIGITIZER_BARREL_SWITCH = &H44
        HID_USAGE_DIGITIZER_ERASER = &H45
        HID_USAGE_DIGITIZER_TABLET_PICK = &H46

        '  &h47 to &hFFFF are reserved in "USB HID Usage Tables 1.11" (Hut1_11.pdf)
    End Enum

    '
    ' Physical Input Page (0x0F)
    '
    Public Enum PhysicalInputPage As UShort
        HID_USAGE_PID_UNDEFINED = &H0
        HID_USAGE_PID_PHYSICAL_INTERFACE_DEVICE = &H1

        HID_USAGE_PID_NORMAL = &H20
        HID_USAGE_PID_SET_EFFECT_REPORT = &H21
        HID_USAGE_PID_EFFECT_BLOCK_INDEX = &H22
        HID_USAGE_PID_PARAMETER_BLOCK_OFFSET = &H23
        HID_USAGE_PID_ROM_FLAG = &H24
        HID_USAGE_PID_EFFECT_TYPE = &H25
        HID_USAGE_PID_ET_CONSTANT_FORCE = &H26
        HID_USAGE_PID_ET_RAMP = &H27
        HID_USAGE_PID_ET_CUSTOM_FORCE_DATA = &H28

        HID_USAGE_PID_ET_SQUARE = &H30
        HID_USAGE_PID_ET_SINE = &H31
        HID_USAGE_PID_ET_TRIANGLE = &H32
        HID_USAGE_PID_ET_SAWTOOTH_UP = &H33
        HID_USAGE_PID_ET_SAWTOOTH_DOWN = &H34

        HID_USAGE_PID_ET_SPRING = &H40
        HID_USAGE_PID_ET_DAMPER = &H41
        HID_USAGE_PID_ET_INERTIA = &H42
        HID_USAGE_PID_ET_FRICTION = &H43

        HID_USAGE_PID_DURATION = &H50
        HID_USAGE_PID_SAMPLE_PERIOD = &H51
        HID_USAGE_PID_GAIN = &H52
        HID_USAGE_PID_TRIGGER_BUTTON = &H53
        HID_USAGE_PID_TRIGGER_REPEAT_INTERVAL = &H54
        HID_USAGE_PID_AXES_ENABLE = &H55
        HID_USAGE_PID_DIRECTION_ENABLE = &H56
        HID_USAGE_PID_DIRECTION = &H57
        HID_USAGE_PID_TYPE_SPECIFIC_BLOCK_OFFSET = &H58
        HID_USAGE_PID_BLOCK_TYPE = &H59
        HID_USAGE_PID_SET_ENVELOPE_REPORT = &H5A
        HID_USAGE_PID_ATTACK_LEVEL = &H5B
        HID_USAGE_PID_ATTACK_TIME = &H5C
        HID_USAGE_PID_FADE_LEVEL = &H5D
        HID_USAGE_PID_FADE_TIME = &H5E
        HID_USAGE_PID_SET_CONDITION_REPORT = &H5F
        HID_USAGE_PID_CP_OFFSET = &H60
        HID_USAGE_PID_POSITIVE_COEFFICIENT = &H61
        HID_USAGE_PID_NEGATIVE_COEFFICIENT = &H62
        HID_USAGE_PID_POSITIVE_SATURATION = &H63
        HID_USAGE_PID_NEGATIVE_SATURATION = &H64
        HID_USAGE_PID_DEAD_BAND = &H65
        HID_USAGE_PID_DOWNLOAD_FORCE_SAMPLE = &H66
        HID_USAGE_PID_ISOCH_CUSTOM_FORCE_ENABLE = &H67
        HID_USAGE_PID_CUSTOM_FORCE_DATA_REPORT = &H68
        HID_USAGE_PID_CUSTOM_FORCE_DATA = &H69
        HID_USAGE_PID_CUSTOM_FORCE_VENDOR_DEFINED_DATA = &H6A
        HID_USAGE_PID_SET_CUSTOM_FORCE_REPORT = &H6B
        HID_USAGE_PID_CUSTOM_FORCE_DATA_OFFSET = &H6C
        HID_USAGE_PID_SAMPLE_COUNT = &H6D
        HID_USAGE_PID_SET_PERIODIC_REPORT = &H6E
        HID_USAGE_PID_OFFSET = &H6F
        HID_USAGE_PID_MAGNITUDE = &H70
        HID_USAGE_PID_PHASE = &H71
        HID_USAGE_PID_PERIOD = &H72
        HID_USAGE_PID_SET_CONSTANT_FORCE_REPORT = &H73
        HID_USAGE_PID_SET_RAMP_FORCE_REPORT = &H74
        HID_USAGE_PID_RAMP_START = &H75
        HID_USAGE_PID_RAMP_END = &H76
        HID_USAGE_PID_EFFECT_OPERATION_REPORT = &H77
        HID_USAGE_PID_EFFECT_OPERATION = &H78
        HID_USAGE_PID_OP_EFFECT_START = &H79
        HID_USAGE_PID_OP_EFFECT_START_SOLO = &H7A
        HID_USAGE_PID_OP_EFFECT_STOP = &H7B
        HID_USAGE_PID_LOOP_COUNT = &H7C
        HID_USAGE_PID_DEVICE_GAIN_REPORT = &H7D
        HID_USAGE_PID_DEVICE_GAIN = &H7E
        HID_USAGE_PID_PID_POOL_REPORT = &H7F
        HID_USAGE_PID_RAM_POOL_SIZE = &H80
        HID_USAGE_PID_ROM_POOL_SIZE = &H81
        HID_USAGE_PID_ROM_EFFECT_BLOCK_COUNT = &H82
        HID_USAGE_PID_SIMULTANEOUS_EFFECTS_MAX = &H83
        HID_USAGE_PID_POOL_ALIGNMENT = &H84
        HID_USAGE_PID_PID_POOL_MOVE_REPORT = &H85
        HID_USAGE_PID_MOVE_SOURCE = &H86
        HID_USAGE_PID_MOVE_DESTINATION = &H87
        HID_USAGE_PID_MOVE_LENGTH = &H88
        HID_USAGE_PID_PID_BLOCK_LOAD_REPORT = &H89

        HID_USAGE_PID_BLOCK_LOAD_STATUS = &H8B
        HID_USAGE_PID_BLOCK_LOAD_SUCCESS = &H8C
        HID_USAGE_PID_BLOCK_LOAD_FULL = &H8D
        HID_USAGE_PID_BLOCK_LOAD_ERROR = &H8E
        HID_USAGE_PID_BLOCK_HANDLE = &H8F
        HID_USAGE_PID_PID_BLOCK_FREE_REPORT = &H90
        HID_USAGE_PID_TYPE_SPECIFIC_BLOCK_HANDLE = &H91
        HID_USAGE_PID_PID_STATE_REPORT = &H92

        HID_USAGE_PID_EFFECT_PLAYING = &H94
        HID_USAGE_PID_PID_DEVICE_CONTROL_REPORT = &H95
        HID_USAGE_PID_PID_DEVICE_CONTROL = &H96
        HID_USAGE_PID_DC_ENABLE_ACTUATORS = &H97
        HID_USAGE_PID_DC_DISABLE_ACTUATORS = &H98
        HID_USAGE_PID_DC_STOP_ALL_EFFECTS = &H99
        HID_USAGE_PID_DC_DEVICE_RESET = &H9A
        HID_USAGE_PID_DC_DEVICE_PAUSE = &H9B
        HID_USAGE_PID_DC_DEVICE_CONTINUE = &H9C

        HID_USAGE_PID_DEVICE_PAUSED = &H9F
        HID_USAGE_PID_ACTUATORS_ENABLED = &HA0

        HID_USAGE_PID_SAFETY_SWITCH = &HA4
        HID_USAGE_PID_ACTUATOR_OVERRIDE_SWITCH = &HA5
        HID_USAGE_PID_ACTUATOR_POWER = &HA6
        HID_USAGE_PID_START_DELAY = &HA7
        HID_USAGE_PID_PARAMETER_BLOCK_SIZE = &HA8
        HID_USAGE_PID_DEVICE_MANAGED_POOL = &HA9
        HID_USAGE_PID_SHARED_PARAMETER_BLOCKS = &HAA
        HID_USAGE_PID_CREATE_NEW_EFFECT_REPORT = &HAB
        HID_USAGE_PID_RAM_POOL_AVAILABLE = &HAC

        ' &hAD to &hFFFF are reserved in "Device Class Definition for Physical Interface Devices 1.0" (pid1_01.pdf)
    End Enum

    '
    ' Unicode Page (0x10)
    '
    '  The Unicode Page directly maps to the two-octet form defined in the Unicode Standard

    '
    ' Alphanumeric Display Page (0x14)
    '
    Public Enum AlphanumericDisplayPage As UShort
        HID_USAGE_ALNUM_DISPLAY_UNDEFINED = &H0
        HID_USAGE_ALNUM_DISPLAY_ALPHANUMERIC_DISPLAY = &H1

        HID_USAGE_ALNUM_DISPLAY_DISPLAY_ATTRIBUTES_REPORT = &H20
        HID_USAGE_ALNUM_DISPLAY_ASCII_CHARSET = &H21
        HID_USAGE_ALNUM_DISPLAY_DATA_READ_BACK = &H22
        HID_USAGE_ALNUM_DISPLAY_FONT_READ_BACK = &H23
        HID_USAGE_ALNUM_DISPLAY_DISPLAY_CONTROL_REPORT = &H24
        HID_USAGE_ALNUM_DISPLAY_CLEAR_DISPLAY = &H25
        HID_USAGE_ALNUM_DISPLAY_DISPLAY_ENABLE = &H26
        HID_USAGE_ALNUM_DISPLAY_SCREEN_SAVER_DELAY = &H27
        HID_USAGE_ALNUM_DISPLAY_SCREEN_SAVER_ENABLE = &H28
        HID_USAGE_ALNUM_DISPLAY_VERTICAL_SCROLL = &H29
        HID_USAGE_ALNUM_DISPLAY_HORIZONTAL_SCROLL = &H2A
        HID_USAGE_ALNUM_DISPLAY_CHARACTER_REPORT = &H2B
        HID_USAGE_ALNUM_DISPLAY_DISPLAY_DATA = &H2C
        HID_USAGE_ALNUM_DISPLAY_DISPLAY_STATUS = &H2D
        HID_USAGE_ALNUM_DISPLAY_STAT_NOT_READY = &H2E
        HID_USAGE_ALNUM_DISPLAY_STAT_READY = &H2F
        HID_USAGE_ALNUM_DISPLAY_ERR_NOT_A_LOADABLE_CHAR = &H30
        HID_USAGE_ALNUM_DISPLAY_ERR_FONT_DATA_CANNOT_BE_READ = &H31
        HID_USAGE_ALNUM_DISPLAY_CURSOR_POSITION_REPORT = &H32
        HID_USAGE_ALNUM_DISPLAY_ROW = &H33
        HID_USAGE_ALNUM_DISPLAY_COLUMN = &H34
        HID_USAGE_ALNUM_DISPLAY_ROWS = &H35
        HID_USAGE_ALNUM_DISPLAY_COLUMNS = &H36
        HID_USAGE_ALNUM_DISPLAY_CURSOR_PIXEL_POSITIONING = &H37
        HID_USAGE_ALNUM_DISPLAY_CURSOR_MODE = &H38
        HID_USAGE_ALNUM_DISPLAY_CURSOR_ENABLE = &H39
        HID_USAGE_ALNUM_DISPLAY_CURSOR_BLINK = &H3A
        HID_USAGE_ALNUM_DISPLAY_FONT_REPORT = &H3B
        HID_USAGE_ALNUM_DISPLAY_FONT_DATA = &H3C
        HID_USAGE_ALNUM_DISPLAY_CHAR_WIDTH = &H3D
        HID_USAGE_ALNUM_DISPLAY_CHAR_HEIGHT = &H3E
        HID_USAGE_ALNUM_DISPLAY_CHAR_SPACING_HORIZONTAL = &H3F
        HID_USAGE_ALNUM_DISPLAY_CHAR_SPACING_VERTICAL = &H40
        HID_USAGE_ALNUM_DISPLAY_UNICODE_CHARSET = &H41
        HID_USAGE_ALNUM_DISPLAY_FONT_7_SEGMENT = &H42
        HID_USAGE_ALNUM_DISPLAY_7_SEGMENT_DIRECT_MAP = &H43
        HID_USAGE_ALNUM_DISPLAY_FONT_14_SEGMENT = &H44
        HID_USAGE_ALNUM_DISPLAY_14_SEGMENT_DIRECT_MAP = &H45
        HID_USAGE_ALNUM_DISPLAY_DISPLAY_BRIGHTNESS = &H46
        HID_USAGE_ALNUM_DISPLAY_DISPLAY_CONTRAST = &H47
        HID_USAGE_ALNUM_DISPLAY_CHAR_ATTRIBUTE = &H48
        HID_USAGE_ALNUM_DISPLAY_ATTRIBUTE_READBACK = &H49
        HID_USAGE_ALNUM_DISPLAY_ATTRIBUTE_DATA = &H4A
        HID_USAGE_ALNUM_DISPLAY_CHAR_ATTR_ENHANCE = &H4B
        HID_USAGE_ALNUM_DISPLAY_CHAR_ATTR_UNDERLINE = &H4C
        HID_USAGE_ALNUM_DISPLAY_CHAR_ATTR_BLINK = &H4D

        ' &h4E to &hFFFF are reserved in "USB HID Usage Tables 1.11" (Hut1_11.pdf)
    End Enum

    '
    ' Medical Instrument Page (0x40)
    '
    Public Enum MedicalInstrumentPage As UShort
        HID_USAGE_MEDICAL_INSTRUMENT_UNDEFINED = &H0
        HID_USAGE_MEDICAL_INSTRUMENT_MEDICAL_ULTRASOUND = &H1

        HID_USAGE_MEDICAL_INSTRUMENT_VCR_AQUISITION = &H20
        HID_USAGE_MEDICAL_INSTRUMENT_FREEZE_THAW = &H21
        HID_USAGE_MEDICAL_INSTRUMENT_CLIP_STORE = &H22
        HID_USAGE_MEDICAL_INSTRUMENT_UPDATE = &H23
        HID_USAGE_MEDICAL_INSTRUMENT_NEXT = &H24
        HID_USAGE_MEDICAL_INSTRUMENT_SAVE = &H25
        HID_USAGE_MEDICAL_INSTRUMENT_PRINT = &H26
        HID_USAGE_MEDICAL_INSTRUMENT_MICROPHONE_ENABLE = &H27

        HID_USAGE_MEDICAL_INSTRUMENT_CINE = &H40
        HID_USAGE_MEDICAL_INSTRUMENT_TRANSMIT_POWER = &H41
        HID_USAGE_MEDICAL_INSTRUMENT_VOLUME = &H42
        HID_USAGE_MEDICAL_INSTRUMENT_FOCUS = &H43
        HID_USAGE_MEDICAL_INSTRUMENT_DEPTH = &H44

        HID_USAGE_MEDICAL_INSTRUMENT_SOFT_STEP_PRIMARY = &H60
        HID_USAGE_MEDICAL_INSTRUMENT_SOFT_STEP_SECONDARY = &H61

        HID_USAGE_MEDICAL_INSTRUMENT_DEPTH_GAIN_COMPENSATION = &H70

        HID_USAGE_MEDICAL_INSTRUMENT_ZOOM_SELECT = &H80
        HID_USAGE_MEDICAL_INSTRUMENT_ZOOM_ADJUST = &H81
        HID_USAGE_MEDICAL_INSTRUMENT_SPECTRAL_DOPPLER_MODE_SELECT = &H82
        HID_USAGE_MEDICAL_INSTRUMENT_SPECTRAL_DOPPLER_ADJUST = &H83
        HID_USAGE_MEDICAL_INSTRUMENT_COLOR_DOPPLER_MODE_SELECT = &H84
        HID_USAGE_MEDICAL_INSTRUMENT_COLOR_DOPPLER_ADJUST = &H85
        HID_USAGE_MEDICAL_INSTRUMENT_MOTION_MODE_SELECT = &H86
        HID_USAGE_MEDICAL_INSTRUMENT_MOTION_MODE_ADJUST = &H87
        HID_USAGE_MEDICAL_INSTRUMENT_2D_MODE_SELECT = &H88
        HID_USAGE_MEDICAL_INSTRUMENT_2D_MODE_ADJUST = &H89

        HID_USAGE_MEDICAL_INSTRUMENT_SOFT_CONTROL_SELECT = &HA0
        HID_USAGE_MEDICAL_INSTRUMENT_SOFT_CONTROL_ADJUST = &HA1

        ' &hA2 to &hFFFF are reserved in "USB HID Usage Tables 1.11" (Hut1_11.pdf)
    End Enum

    '
    ' USB Monitor Page (0x80)
    '
    Public Enum USBMonitorPage As UShort
        HID_USAGE_MONITOR_RESERVED = &H0
        HID_USAGE_MONITOR_MONITOR_CONTROL = &H1
        HID_USAGE_MONITOR_EDID_INFORMATION = &H2
        HID_USAGE_MONITOR_VDIF_INFORMATION = &H3
        HID_USAGE_MONITOR_VESA_VERSION = &H4
    End Enum

    '
    ' Monitor Enumerated Values Page (0x81)
    '
    Public Enum MonitorEnumeratedValuesPage As UShort
        HID_USAGE_MONITOR_ENUM_VALUE_NO_VALUE = &H0

        ' read "usbmon10.pdf" from USB IF for more info
    End Enum

    '
    ' Monitor VESA Virtual Control Page (0x82)
    '
    Public Enum MonitorVESAVirtualControlPage As UShort
        HID_USAGE_MONITOR_VESA_BRIGHTNESS = &H10
        HID_USAGE_MONITOR_VESA_CONTRAST = &H12
        HID_USAGE_MONITOR_VESA_RED_VIDEO_GAIN = &H16
        HID_USAGE_MONITOR_VESA_GREEN_VIDEO_GAIN = &H18
        HID_USAGE_MONITOR_VESA_BLUE_VIDEO_GAIN = &H1A
        HID_USAGE_MONITOR_VESA_FOCUS = &H1C
        HID_USAGE_MONITOR_VESA_HORIZONTAL_POS = &H20
        HID_USAGE_MONITOR_VESA_HORIZONTAL_SIZE = &H22
        HID_USAGE_MONITOR_VESA_HORIZONTAL_PINCUSHION = &H24
        HID_USAGE_MONITOR_VESA_HORIZONTAL_PINCUSHION_BALANCE = &H26
        HID_USAGE_MONITOR_VESA_HORIZONTAL_MISCONVERGENCE = &H28
        HID_USAGE_MONITOR_VESA_HORIZONTAL_LINEARITY = &H2A
        HID_USAGE_MONITOR_VESA_HORIZONTAL_LINEARITY_BALANCE = &H2C
        HID_USAGE_MONITOR_VESA_VERTICAL_POS = &H30
        HID_USAGE_MONITOR_VESA_VERTICAL_SIZE = &H32
        HID_USAGE_MONITOR_VESA_VERTICAL_PINCUSHION = &H34
        HID_USAGE_MONITOR_VESA_VERTICAL_PINCUSHION_BALANCE = &H36
        HID_USAGE_MONITOR_VESA_VERTICAL_MISCONVERGENCE = &H38
        HID_USAGE_MONITOR_VESA_VERTICAL_LINEARITY = &H3A
        HID_USAGE_MONITOR_VESA_VERTICAL_LINEARITY_BALANCE = &H3C
        HID_USAGE_MONITOR_VESA_PARALLELOGRAM_DISTORTION = &H40
        HID_USAGE_MONITOR_VESA_TRAPEZOIDAL_DISTORTION = &H42
        HID_USAGE_MONITOR_VESA_TILT = &H44
        HID_USAGE_MONITOR_VESA_TOP_CORNER_DISTORTION = &H46
        HID_USAGE_MONITOR_VESA_TOP_CORNER_DISTORTION_BALANCE = &H48
        HID_USAGE_MONITOR_VESA_BOTTOM_CORNER_DISTORTION = &H4A
        HID_USAGE_MONITOR_VESA_BOTTOM_CORNER_DISTORTION_BALANCE = &H4C
        HID_USAGE_MONITOR_VESA_HORIZONTAL_MOIRE = &H56
        HID_USAGE_MONITOR_VESA_VERTICAL_MOIRE = &H58
        HID_USAGE_MONITOR_VESA_RED_VIDEO_BLACK_LEVEL = &H6C
        HID_USAGE_MONITOR_VESA_GREEN_VIDEO_BLACK_LEVEL = &H6E
        HID_USAGE_MONITOR_VESA_BLUE_VIDEO_BLACK_LEVEL = &H70
        HID_USAGE_MONITOR_VESA_INPUT_LEVEL_SELECT = &H5E
        HID_USAGE_MONITOR_VESA_INPUT_SOURCE_SELECT = &H60
        HID_USAGE_MONITOR_VESA_ON_SCREEN_DISPLAY = &HCA
        HID_USAGE_MONITOR_VESA_STEREO_MODE = &HD4
        HID_USAGE_MONITOR_VESA_AUTO_SIZE_CENTER = &HA2
        HID_USAGE_MONITOR_VESA_POLARITY_HORIZONTAL_SYNC = &HA4
        HID_USAGE_MONITOR_VESA_POLARITY_VERTICAL_SYNC = &HA6
        HID_USAGE_MONITOR_VESA_SYNC_TYPE = &HA8
        HID_USAGE_MONITOR_VESA_SCREEN_ORIENTATION = &HAA
        HID_USAGE_MONITOR_VESA_HORIZONTAL_FREQUENCY = &HAC
        HID_USAGE_MONITOR_VESA_VERTICAL_FREQUENCY = &HAE
        HID_USAGE_MONITOR_VESA_DEGAUSS = &H1
        HID_USAGE_MONITOR_VESA_SETTINGS = &HB0
    End Enum

    '
    ' Monitor Reserved Page (0x83)
    '

    '
    ' Power Device Page (0x84)
    '
    Public Enum PowerDevicePage As UShort
        HID_USAGE_POWER_DEVICE_UNDEFINED = &H0
        HID_USAGE_POWER_DEVICE_INAME = &H1
        HID_USAGE_POWER_DEVICE_PRESENT_STATUS = &H2
        HID_USAGE_POWER_DEVICE_CHANGED_STATUS = &H3
        HID_USAGE_POWER_DEVICE_UPS = &H4
        HID_USAGE_POWER_DEVICE_POWER_SUPPLY = &H5

        HID_USAGE_POWER_DEVICE_BATTERY_SYSTEM = &H10
        HID_USAGE_POWER_DEVICE_BATTERY_SYSTEM_ID = &H11
        HID_USAGE_POWER_DEVICE_BATTERY = &H12
        HID_USAGE_POWER_DEVICE_BATTERY_ID = &H13
        HID_USAGE_POWER_DEVICE_CHARGER = &H14
        HID_USAGE_POWER_DEVICE_CHARGER_ID = &H15
        HID_USAGE_POWER_DEVICE_POWER_CONVERTER = &H16
        HID_USAGE_POWER_DEVICE_POWER_CONVERTER_ID = &H17
        HID_USAGE_POWER_DEVICE_OUTLET_SYSTEM = &H18
        HID_USAGE_POWER_DEVICE_OUTLET_SYSTEM_ID = &H19
        HID_USAGE_POWER_DEVICE_INPUT = &H1A
        HID_USAGE_POWER_DEVICE_INPUT_ID = &H1B
        HID_USAGE_POWER_DEVICE_OUTPUT = &H1C
        HID_USAGE_POWER_DEVICE_OUTPUT_ID = &H1D
        HID_USAGE_POWER_DEVICE_FLOW = &H1E
        HID_USAGE_POWER_DEVICE_FLOW_ID = &H1F
        HID_USAGE_POWER_DEVICE_OUTLET = &H20
        HID_USAGE_POWER_DEVICE_OUTLET_ID = &H21
        HID_USAGE_POWER_DEVICE_GANG = &H22
        HID_USAGE_POWER_DEVICE_GANG_ID = &H23
        HID_USAGE_POWER_DEVICE_POWER_SUMMARY = &H24
        HID_USAGE_POWER_DEVICE_POWER_SUMMARY_ID = &H25

        HID_USAGE_POWER_DEVICE_VOLTAGE = &H30
        HID_USAGE_POWER_DEVICE_CURRENT = &H31
        HID_USAGE_POWER_DEVICE_FREQUENCY = &H32
        HID_USAGE_POWER_DEVICE_APPARENT_POWER = &H33
        HID_USAGE_POWER_DEVICE_ACTIVE_POWER = &H34
        HID_USAGE_POWER_DEVICE_PERCENT_LOAD = &H35
        HID_USAGE_POWER_DEVICE_TEMPERATURE = &H36
        HID_USAGE_POWER_DEVICE_HUMIDITY = &H37
        HID_USAGE_POWER_DEVICE_BAD_COUNT = &H38

        HID_USAGE_POWER_DEVICE_CONFIG_VOLTAGE = &H40
        HID_USAGE_POWER_DEVICE_CONFIG_CURRENT = &H41
        HID_USAGE_POWER_DEVICE_CONFIG_FREQUENCY = &H42
        HID_USAGE_POWER_DEVICE_CONFIG_APPARENT_POWER = &H43
        HID_USAGE_POWER_DEVICE_CONFIG_ACTIVE_POWER = &H44
        HID_USAGE_POWER_DEVICE_CONFIG_PERCENT_LOAD = &H45
        HID_USAGE_POWER_DEVICE_CONFIG_TEMPERATURE = &H46
        HID_USAGE_POWER_DEVICE_CONFIG_HUMIDITY = &H47

        HID_USAGE_POWER_DEVICE_SWITCH_ON_CONTROL = &H50
        HID_USAGE_POWER_DEVICE_SWITCH_OFF_CONTROL = &H51
        HID_USAGE_POWER_DEVICE_TOGGLE_CONTROL = &H52
        HID_USAGE_POWER_DEVICE_LOW_VOLTAGE_TRANSFER = &H53
        HID_USAGE_POWER_DEVICE_HIGH_VOLTAGE_TRANSFER = &H54
        HID_USAGE_POWER_DEVICE_DELAY_BEFORE_REBOOT = &H55
        HID_USAGE_POWER_DEVICE_DELAY_BEFORE_STARTUP = &H56
        HID_USAGE_POWER_DEVICE_DELAY_BEFORE_SHUTDOWN = &H57
        HID_USAGE_POWER_DEVICE_TEST = &H58
        HID_USAGE_POWER_DEVICE_MODULE_RESET = &H59
        HID_USAGE_POWER_DEVICE_AUDIBLE_ALARM_CONTROL = &H5A

        HID_USAGE_POWER_DEVICE_PRESENT = &H60
        HID_USAGE_POWER_DEVICE_GOOD = &H61
        HID_USAGE_POWER_DEVICE_INTERNAL_FAILURE = &H62
        HID_USAGE_POWER_DEVICE_VOLTAGE_OUT_OF_RANGE = &H63
        HID_USAGE_POWER_DEVICE_FREQUENCY_OUT_OF_RANGE = &H64
        HID_USAGE_POWER_DEVICE_OVERLOAD = &H65
        HID_USAGE_POWER_DEVICE_OVERCHARGED = &H66
        HID_USAGE_POWER_DEVICE_OVERTEMPERATURE = &H67
        HID_USAGE_POWER_DEVICE_SHUTDOWN_REQUESTED = &H68
        HID_USAGE_POWER_DEVICE_SHUTDOWN_IMMINENT = &H69

        HID_USAGE_POWER_DEVICE_SWITCH_ON_OFF = &H6B
        HID_USAGE_POWER_DEVICE_SWITCHABLE = &H6C
        HID_USAGE_POWER_DEVICE_USED = &H6D
        HID_USAGE_POWER_DEVICE_BOOST = &H6E
        HID_USAGE_POWER_DEVICE_BUCK = &H6F
        HID_USAGE_POWER_DEVICE_INITIALIZED = &H70
        HID_USAGE_POWER_DEVICE_TESTED = &H71
        HID_USAGE_POWER_DEVICE_AWAITING_POWER = &H72
        HID_USAGE_POWER_DEVICE_COMMUNICATION_LOST = &H73

        HID_USAGE_POWER_DEVICE_IMANUFACTURER = &HFD
        HID_USAGE_POWER_DEVICE_IPRODUCT = &HFE
        HID_USAGE_POWER_DEVICE_ISERIALNUMBER = &HFF
    End Enum

    '
    ' Battery System Page (0x85)
    '
    Public Enum BatterySystemPage As UShort
        HID_USAGE_BATTERY_SYSTEM_UNDEFINED = &H0
        HID_USAGE_BATTERY_SYSTEM_SMB_BATTERY_MODE = &H1
        HID_USAGE_BATTERY_SYSTEM_SMB_BATTERY_STATUS = &H2
        HID_USAGE_BATTERY_SYSTEM_SMB_ALARM_WARNING = &H3
        HID_USAGE_BATTERY_SYSTEM_SMB_CHARGER_MODE = &H4
        HID_USAGE_BATTERY_SYSTEM_SMB_CHARGER_STATUS = &H5
        HID_USAGE_BATTERY_SYSTEM_SMB_CHARGER_SPEC_INFO = &H6
        HID_USAGE_BATTERY_SYSTEM_SMB_SELECTOR_STATE = &H7
        HID_USAGE_BATTERY_SYSTEM_SMB_SELECTOR_PRESETS = &H8
        HID_USAGE_BATTERY_SYSTEM_SMB_SELECTOR_INFO = &H9

        HID_USAGE_BATTERY_SYSTEM_OPTIONAL_MFG_FUNCTION_1 = &H10
        HID_USAGE_BATTERY_SYSTEM_OPTIONAL_MFG_FUNCTION_2 = &H11
        HID_USAGE_BATTERY_SYSTEM_OPTIONAL_MFG_FUNCTION_3 = &H12
        HID_USAGE_BATTERY_SYSTEM_OPTIONAL_MFG_FUNCTION_4 = &H13
        HID_USAGE_BATTERY_SYSTEM_OPTIONAL_MFG_FUNCTION_5 = &H14
        HID_USAGE_BATTERY_SYSTEM_CONNECTION_TO_SMBUS = &H15
        HID_USAGE_BATTERY_SYSTEM_OUTPUT_CONNECTION = &H16
        HID_USAGE_BATTERY_SYSTEM_CHARGER_CONNECTION = &H17
        HID_USAGE_BATTERY_SYSTEM_BATTERY_INSERTION = &H18
        HID_USAGE_BATTERY_SYSTEM_USE_NEXT = &H19
        HID_USAGE_BATTERY_SYSTEM_OK_TO_USE = &H1A
        HID_USAGE_BATTERY_SYSTEM_BATTERY_SUPPORTED = &H1B
        HID_USAGE_BATTERY_SYSTEM_SELECTOR_REVISION = &H1C
        HID_USAGE_BATTERY_SYSTEM_CHARGING_INDICATOR = &H1D

        HID_USAGE_BATTERY_SYSTEM_MANUFACTURER_ACCESS = &H28
        HID_USAGE_BATTERY_SYSTEM_REMAINING_CAPACITY_LIMIT = &H29
        HID_USAGE_BATTERY_SYSTEM_REMAINING_TIME_LIMIT = &H2A
        HID_USAGE_BATTERY_SYSTEM_AT_RATE = &H2B
        HID_USAGE_BATTERY_SYSTEM_CAPACITY_MODE = &H2C
        HID_USAGE_BATTERY_SYSTEM_BROADCAST_TO_CHARGER = &H2D
        HID_USAGE_BATTERY_SYSTEM_PRIMARY_BATTERY = &H2E
        HID_USAGE_BATTERY_SYSTEM_CHARGE_CONTROLLER = &H2F

        HID_USAGE_BATTERY_SYSTEM_TERMINATE_CHARGE = &H40
        HID_USAGE_BATTERY_SYSTEM_TERMINATE_DISCHARGE = &H41
        HID_USAGE_BATTERY_SYSTEM_BELOW_REMAINING_CAPACITY_LIMIT = &H42
        HID_USAGE_BATTERY_SYSTEM_REMAINING_TIME_LIMIT_EXPIRED = &H43
        HID_USAGE_BATTERY_SYSTEM_CHARGING = &H44
        HID_USAGE_BATTERY_SYSTEM_DISCHARGING = &H45
        HID_USAGE_BATTERY_SYSTEM_FULLY_CHARGED = &H46
        HID_USAGE_BATTERY_SYSTEM_FULLY_DISCHARGED = &H47
        HID_USAGE_BATTERY_SYSTEM_CONDITIONING_FLAG = &H48
        HID_USAGE_BATTERY_SYSTEM_AT_RATE_OK = &H49
        HID_USAGE_BATTERY_SYSTEM_SMB_ERROR_CODE = &H4A
        HID_USAGE_BATTERY_SYSTEM_NEED_REPLACEMENT = &H4B

        HID_USAGE_BATTERY_SYSTEM_AT_RATE_TIME_TO_FULL = &H60
        HID_USAGE_BATTERY_SYSTEM_AT_RATE_TIME_TO_EMPTY = &H61
        HID_USAGE_BATTERY_SYSTEM_AVERAGE_CURRENT = &H62
        HID_USAGE_BATTERY_SYSTEM_MAX_ERROR = &H63
        HID_USAGE_BATTERY_SYSTEM_RELATIVE_STATE_OF_CHARGE = &H64
        HID_USAGE_BATTERY_SYSTEM_ABSOLUTE_STATE_OF_CHARGE = &H65
        HID_USAGE_BATTERY_SYSTEM_REMAINING_CAPACITY = &H66
        HID_USAGE_BATTERY_SYSTEM_FULL_CHARGE_CAPACITY = &H67
        HID_USAGE_BATTERY_SYSTEM_RUN_TIME_TO_EMPTY = &H68
        HID_USAGE_BATTERY_SYSTEM_AVERAGE_TIME_TO_EMPTY = &H69
        HID_USAGE_BATTERY_SYSTEM_AVERAGE_TIME_TO_FULL = &H6A
        HID_USAGE_BATTERY_SYSTEM_CYCLE_COUNT = &H6B

        HID_USAGE_BATTERY_SYSTEM_BATT_PACK_MODEL_LEVEL = &H80
        HID_USAGE_BATTERY_SYSTEM_INTERNAL_CHARGE_CONTROLLER = &H81
        HID_USAGE_BATTERY_SYSTEM_PRIMARY_BATTERY_SUPPORT = &H82
        HID_USAGE_BATTERY_SYSTEM_DESIGN_CAPACITY = &H83
        HID_USAGE_BATTERY_SYSTEM_SPECIFICATION_INFO = &H84
        HID_USAGE_BATTERY_SYSTEM_MANUFACTURER_DATE = &H85
        HID_USAGE_BATTERY_SYSTEM_SERIAL_NUMBER = &H86
        HID_USAGE_BATTERY_SYSTEM_I_MANUFACTURER_NAME = &H87
        HID_USAGE_BATTERY_SYSTEM_I_DEVICE_NAME = &H88
        HID_USAGE_BATTERY_SYSTEM_I_DEVICE_CHEMISTERY = &H89
        HID_USAGE_BATTERY_SYSTEM_MANUFACTURER_DATA = &H8A
        HID_USAGE_BATTERY_SYSTEM_RECHARGABLE = &H8B
        HID_USAGE_BATTERY_SYSTEM_WARNING_CAPACITY_LIMIT = &H8C
        HID_USAGE_BATTERY_SYSTEM_CAPACITY_GRANULARITY_1 = &H8D
        HID_USAGE_BATTERY_SYSTEM_CAPACITY_GRANULARITY_2 = &H8E
        HID_USAGE_BATTERY_SYSTEM_I_OEM_INFORMATION = &H8F

        HID_USAGE_BATTERY_SYSTEM_INHIBIT_CHARGE = &HC0
        HID_USAGE_BATTERY_SYSTEM_ENABLE_POLLING = &HC1
        HID_USAGE_BATTERY_SYSTEM_RESET_TO_ZERO = &HC2

        HID_USAGE_BATTERY_SYSTEM_AC_PRESENT = &HD0
        HID_USAGE_BATTERY_SYSTEM_BATTERY_PRESENT = &HD1
        HID_USAGE_BATTERY_SYSTEM_POWER_FAIL = &HD2
        HID_USAGE_BATTERY_SYSTEM_ALARM_INHIBITED = &HD3
        HID_USAGE_BATTERY_SYSTEM_THERMISTOR_UNDER_RANGE = &HD4
        HID_USAGE_BATTERY_SYSTEM_THERMISTOR_HOT = &HD5
        HID_USAGE_BATTERY_SYSTEM_THERMISTOR_COLD = &HD6
        HID_USAGE_BATTERY_SYSTEM_THERMISTOR_OVER_RANGE = &HD7
        HID_USAGE_BATTERY_SYSTEM_VOLTAGE_OUT_OF_RANGE = &HD8
        HID_USAGE_BATTERY_SYSTEM_CURRENT_OUT_OF_RANGE = &HD9
        HID_USAGE_BATTERY_SYSTEM_CURRENT_NOT_REGULATED = &HDA
        HID_USAGE_BATTERY_SYSTEM_VOLTAGE_NOT_REGULATED = &HDB
        HID_USAGE_BATTERY_SYSTEM_MASTER_MODE = &HDC

        HID_USAGE_BATTERY_SYSTEM_CHARGER_SELECTOR_SUPPORT = &HF0
        HID_USAGE_BATTERY_SYSTEM_CHARGER_SPEC = &HF1
        HID_USAGE_BATTERY_SYSTEM_LEVEL_2 = &HF2
        HID_USAGE_BATTERY_SYSTEM_LEVEL_3 = &HF3

        ' &hF4 to &hFF are reserved in "Usage Tables for HID Power Devices 1.0" (pdcv10.pdf)
    End Enum

    '
    ' Barcode Scanner Page (0x8C)
    '
    Public Enum BarcodeScannerPage As UShort
        HID_USAGE_BARCODE_SCANNER_UNDEFINED = &H0
        HID_USAGE_BARCODE_SCANNER_BAR_CODE_BADGE_READER = &H1
        HID_USAGE_BARCODE_SCANNER_BAR_CODE_SCANNER = &H2
        HID_USAGE_BARCODE_SCANNER_DUMB_BAR_CODE_SCANNER = &H3
        HID_USAGE_BARCODE_SCANNER_CORDLESS_SCANNER_BASE = &H4
        HID_USAGE_BARCODE_SCANNER_BAR_CODE_SCANNER_CRADLE = &H5

        HID_USAGE_BARCODE_SCANNER_ATTRIBUTE_REPORT = &H10
        HID_USAGE_BARCODE_SCANNER_SETTINGS_REPORT = &H11
        HID_USAGE_BARCODE_SCANNER_SCANNED_DATA_REPORT = &H12
        HID_USAGE_BARCODE_SCANNER_RAW_SCANNED_DATA_REPORT = &H13
        HID_USAGE_BARCODE_SCANNER_TRIGGER_REPORT = &H14
        HID_USAGE_BARCODE_SCANNER_STATUS_REPORT = &H15
        HID_USAGE_BARCODE_SCANNER_UPC_EAN_CONTROL_REPORT = &H16
        HID_USAGE_BARCODE_SCANNER_EAN_2_3_LABEL_CONTROL_REPORT = &H17
        HID_USAGE_BARCODE_SCANNER_CODE_39_CONTROL_REPORT = &H18
        HID_USAGE_BARCODE_SCANNER_INTERLEAVED_2_OF_5_CONTROL_REPORT = &H19
        HID_USAGE_BARCODE_SCANNER_STANDARD_2_OF_5_CONTROL_REPORT = &H1A
        HID_USAGE_BARCODE_SCANNER_MSI_PLESSEY_CONTROL_REPORT = &H1B
        HID_USAGE_BARCODE_SCANNER_CODABAR_CONTROL_REPORT = &H1C
        HID_USAGE_BARCODE_SCANNER_CODE_128_CONTROL_REPORT = &H1D
        HID_USAGE_BARCODE_SCANNER_MISC_1D_CONTROL_REPORT = &H1E
        HID_USAGE_BARCODE_SCANNER_2D_CONTROL_REPORT = &H1F

        HID_USAGE_BARCODE_SCANNER_AIMING_POINTER_MODE = &H30
        HID_USAGE_BARCODE_SCANNER_BAR_CODE_PRESENT_SENSOR = &H31
        HID_USAGE_BARCODE_SCANNER_CLASS_1A_LASER = &H32
        HID_USAGE_BARCODE_SCANNER_CLASS_2_LASER = &H33
        HID_USAGE_BARCODE_SCANNER_HEATER_PRESENT = &H34
        HID_USAGE_BARCODE_SCANNER_CONTACT_SCANNER = &H35
        HID_USAGE_BARCODE_SCANNER_ELECTRONIC_ARTICLE_SURVEILLANCE_NOTIFICATION = &H36
        HID_USAGE_BARCODE_SCANNER_CONSTANT_ARTICLE_SURVEILLANCE_NOTIFICATION = &H37
        HID_USAGE_BARCODE_SCANNER_ERROR_INDICATION = &H38
        HID_USAGE_BARCODE_SCANNER_FIXED_BEEPER = &H39
        HID_USAGE_BARCODE_SCANNER_GOOD_DECODE_INDICATION = &H3A
        HID_USAGE_BARCODE_SCANNER_HANDS_FREE_SCANNING = &H3B
        HID_USAGE_BARCODE_SCANNER_INTRINSICALLY_SAFE = &H3C
        HID_USAGE_BARCODE_SCANNER_KLASSE_EINS_LASER = &H3D
        HID_USAGE_BARCODE_SCANNER_LONG_RANGE_SCANNER = &H3E
        HID_USAGE_BARCODE_SCANNER_MIRROR_SPEED_CONTROL = &H3F
        HID_USAGE_BARCODE_SCANNER_NOT_ON_FILE_INDICATION = &H40
        HID_USAGE_BARCODE_SCANNER_PROGRAMMABLE_BEEPER = &H41
        HID_USAGE_BARCODE_SCANNER_TRIGGERLESS = &H42
        HID_USAGE_BARCODE_SCANNER_WAND = &H43
        HID_USAGE_BARCODE_SCANNER_WATER_RESISTANT = &H44
        HID_USAGE_BARCODE_SCANNER_MULTI_RANGE_SCANNER = &H45
        HID_USAGE_BARCODE_SCANNER_PROXIMITIY_SENSOR = &H46

        HID_USAGE_BARCODE_SCANNER_FRAGMENT_DECODING = &H4D
        HID_USAGE_BARCODE_SCANNER_SCANNER_READ_CONFIDENCE = &H4E
        HID_USAGE_BARCODE_SCANNER_DATA_PREFIX = &H4F
        HID_USAGE_BARCODE_SCANNER_PREFIX_AIMI = &H50
        HID_USAGE_BARCODE_SCANNER_PREFIX_NODE = &H51
        HID_USAGE_BARCODE_SCANNER_PREFIX_PROPRIETARY = &H52

        HID_USAGE_BARCODE_SCANNER_ACTIVE_TIME = &H55
        HID_USAGE_BARCODE_SCANNER_AIMING_LASER_PATTERN = &H56
        HID_USAGE_BARCODE_SCANNER_BAR_CODE_PRESENT = &H57
        HID_USAGE_BARCODE_SCANNER_BEEPER_STATE = &H58
        HID_USAGE_BARCODE_SCANNER_LASER_ON_TIME = &H59
        HID_USAGE_BARCODE_SCANNER_LASER_STATE = &H5A
        HID_USAGE_BARCODE_SCANNER_LOCKOUT_TIME = &H5B
        HID_USAGE_BARCODE_SCANNER_MOTOR_STATE = &H5C
        HID_USAGE_BARCODE_SCANNER_MOTOR_TIMEOUT = &H5D
        HID_USAGE_BARCODE_SCANNER_POWER_ON_RESET_SCANNER = &H5E
        HID_USAGE_BARCODE_SCANNER_PREVENT_READ_OF_BARCODES = &H5F
        HID_USAGE_BARCODE_SCANNER_INITIATE_BARCODE_READ = &H60
        HID_USAGE_BARCODE_SCANNER_TRIGGER_STATE = &H61
        HID_USAGE_BARCODE_SCANNER_TRIGGER_MODE = &H62
        HID_USAGE_BARCODE_SCANNER_TM_BLINKING_LASER_ON = &H63
        HID_USAGE_BARCODE_SCANNER_TM_CONTINUOUS_LASER_ON = &H64
        HID_USAGE_BARCODE_SCANNER_TM_LASER_ON_WHILE_PULLED = &H65
        HID_USAGE_BARCODE_SCANNER_TM_LASER_STAYS_ON_AFTER_TRIGGER_RELEASE = &H66

        HID_USAGE_BARCODE_SCANNER_COMMIT_PARAMETERS_TO_NVM = &H6D
        HID_USAGE_BARCODE_SCANNER_PARAMETER_SCANNING = &H6E
        HID_USAGE_BARCODE_SCANNER_PARAMETERS_CHANGED = &H6F
        HID_USAGE_BARCODE_SCANNER_SET_PARAMETER_DEFAULT_VALUES = &H70

        HID_USAGE_BARCODE_SCANNER_SCANNER_IN_CRADLE = &H75
        HID_USAGE_BARCODE_SCANNER_SCANNER_IN_RANGE = &H76

        HID_USAGE_BARCODE_SCANNER_AIM_DURATION = &H7A
        HID_USAGE_BARCODE_SCANNER_GOOD_READ_LAMP_DURATION = &H7B
        HID_USAGE_BARCODE_SCANNER_GOOD_READ_LAMP_INTENSITY = &H7C
        HID_USAGE_BARCODE_SCANNER_GOOD_READ_LED = &H7D
        HID_USAGE_BARCODE_SCANNER_GOOD_READ_TONE_FREQUENCY = &H7E
        HID_USAGE_BARCODE_SCANNER_GOOD_READ_TONE_LENGTH = &H7F
        HID_USAGE_BARCODE_SCANNER_GOOD_READ_TONE_VOLUME = &H80

        HID_USAGE_BARCODE_SCANNER_NO_READ_MESSAGE = &H82
        HID_USAGE_BARCODE_SCANNER_NOT_ON_FILE_VOLUME = &H83
        HID_USAGE_BARCODE_SCANNER_POWERUP_BEEP = &H84
        HID_USAGE_BARCODE_SCANNER_SOUND_ERROR_BEEP = &H85
        HID_USAGE_BARCODE_SCANNER_SOUND_GOOD_READ_BEEP = &H86
        HID_USAGE_BARCODE_SCANNER_SOUND_NOT_ON_FILE_BEEP = &H87
        HID_USAGE_BARCODE_SCANNER_GOOD_READ_WHEN_TO_WRITE = &H88
        HID_USAGE_BARCODE_SCANNER_GRWTI_AFTER_DECODE = &H89
        HID_USAGE_BARCODE_SCANNER_GRWTI_BEEP_LAMP_AFTER_TRANSMIT = &H8A
        HID_USAGE_BARCODE_SCANNER_GRWTI_NO_BEEP_LAMP_USE_AT_ALL = &H8B

        HID_USAGE_BARCODE_SCANNER_BOOKLAND_EAN = &H91
        HID_USAGE_BARCODE_SCANNER_CONVERT_EAN_8_TO_13_TYPE = &H92
        HID_USAGE_BARCODE_SCANNER_CONVERT_UPC_A_TO_EAN_13 = &H93
        HID_USAGE_BARCODE_SCANNER_CONVERT_UPC_E_TO_A = &H94
        HID_USAGE_BARCODE_SCANNER_EAN_13 = &H95
        HID_USAGE_BARCODE_SCANNER_EAN_8 = &H96
        HID_USAGE_BARCODE_SCANNER_EAN_99_128_MANDATORY = &H97
        HID_USAGE_BARCODE_SCANNER_EAN_99_P5_128_OPTIONAL = &H98

        HID_USAGE_BARCODE_SCANNER_UPC_EAN = &H9A
        HID_USAGE_BARCODE_SCANNER_UPC_EAN_COUPON_CODE = &H9B
        HID_USAGE_BARCODE_SCANNER_UPC_EAN_PERIODICALS = &H9C
        HID_USAGE_BARCODE_SCANNER_UPC_A = &H9D
        HID_USAGE_BARCODE_SCANNER_UPC_A_WITH_128_MANDATORY = &H9E
        HID_USAGE_BARCODE_SCANNER_UPC_A_WITH_128_OPTIONAL = &H9F
        HID_USAGE_BARCODE_SCANNER_UPC_A_WITH_P5_OPTIONAL = &HA0
        HID_USAGE_BARCODE_SCANNER_UPC_E = &HA1
        HID_USAGE_BARCODE_SCANNER_UPC_E1 = &HA2

        HID_USAGE_BARCODE_SCANNER_PERIODICAL = &HA9
        HID_USAGE_BARCODE_SCANNER_PERIODICAL_AUTODISCRIMINATE_2 = &HAA
        HID_USAGE_BARCODE_SCANNER_PERIODICAL_ONLY_DECODE_WITH_2 = &HAB
        HID_USAGE_BARCODE_SCANNER_PERIODICAL_IGNORE_2 = &HAC
        HID_USAGE_BARCODE_SCANNER_PERIODICAL_AUTODISCRIMINATE_5 = &HAD
        HID_USAGE_BARCODE_SCANNER_PERIODICAL_ONLY_DECODE_WITH_5 = &HAE
        HID_USAGE_BARCODE_SCANNER_PERIODICAL_IGNORE_5 = &HAF
        HID_USAGE_BARCODE_SCANNER_CHECK = &HB0
        HID_USAGE_BARCODE_SCANNER_CHECK_DISABLE_PRICE = &HB1
        HID_USAGE_BARCODE_SCANNER_CHECK_ENABLE_4_DIGIT_PRICE = &HB2
        HID_USAGE_BARCODE_SCANNER_CHECK_ENABLE_5_DIGIT_PRICE = &HB3
        HID_USAGE_BARCODE_SCANNER_CHECK_ENABLE_EUROPEAN_4_DIGIT_PRICE = &HB4
        HID_USAGE_BARCODE_SCANNER_CHECK_ENABLE_EUROPEAN_5_DIGIT_PRICE = &HB5

        HID_USAGE_BARCODE_SCANNER_EAN_TWO_LABEL = &HB7
        HID_USAGE_BARCODE_SCANNER_EAN_THREE_LABEL = &HB8
        HID_USAGE_BARCODE_SCANNER_EAN_8_FLAG_DIGIT_1 = &HB9
        HID_USAGE_BARCODE_SCANNER_EAN_8_FLAG_DIGIT_2 = &HBA
        HID_USAGE_BARCODE_SCANNER_EAN_8_FLAG_DIGIT_3 = &HBB
        HID_USAGE_BARCODE_SCANNER_EAN_13_FLAG_DIGIT_1 = &HBC
        HID_USAGE_BARCODE_SCANNER_EAN_13_FLAG_DIGIT_2 = &HBD
        HID_USAGE_BARCODE_SCANNER_EAN_13_FLAG_DIGIT_3 = &HBE
        HID_USAGE_BARCODE_SCANNER_ADD_EAN_2_3_LABEL_DEFINITION = &HBF
        HID_USAGE_BARCODE_SCANNER_CLEAR_ALL_EAN_2_3_LABEL_DEFINITIONS = &HC0

        HID_USAGE_BARCODE_SCANNER_CODABAR = &HC3
        HID_USAGE_BARCODE_SCANNER_CODE_128 = &HC4

        HID_USAGE_BARCODE_SCANNER_CODE_39 = &HC7
        HID_USAGE_BARCODE_SCANNER_CODE_93 = &HC8
        HID_USAGE_BARCODE_SCANNER_FULL_ASCII_CONVERSION = &HC9
        HID_USAGE_BARCODE_SCANNER_INTERLEAVED_2_OF_5 = &HCA
        HID_USAGE_BARCODE_SCANNER_ITALIAN_PHARMACY_CODE = &HCB
        HID_USAGE_BARCODE_SCANNER_MSI_PLESSEY = &HCC
        HID_USAGE_BARCODE_SCANNER_STANDARD_2_OF_5_IATA = &HCD
        HID_USAGE_BARCODE_SCANNER_STANDARD_2_OF_5 = &HCE

        HID_USAGE_BARCODE_SCANNER_TRANSMIT_START_STOP = &HD3
        HID_USAGE_BARCODE_SCANNER_TRI_OPTIC = &HD4
        HID_USAGE_BARCODE_SCANNER_UCC_EAN_128 = &HD5
        HID_USAGE_BARCODE_SCANNER_CHECK_DIGIT = &HD6
        HID_USAGE_BARCODE_SCANNER_CD_DISABLE = &HD7
        HID_USAGE_BARCODE_SCANNER_CD_ENABLE_INTERLEAVED_2_OF_5_OPCC = &HD8
        HID_USAGE_BARCODE_SCANNER_CD_ENABLE_INTERLEAVED_2_OF_5_USS = &HD9
        HID_USAGE_BARCODE_SCANNER_CD_ENABLE_STANDARD_2_OF_5_OPCC = &HDA
        HID_USAGE_BARCODE_SCANNER_CD_ENABLE_STANDARD_2_OF_5_USS = &HDB
        HID_USAGE_BARCODE_SCANNER_CD_ENABLE_ONE_MSI_PLESSEY = &HDC
        HID_USAGE_BARCODE_SCANNER_CD_ENABLE_TWO_MSI_PLESSEY = &HDD
        HID_USAGE_BARCODE_SCANNER_CD_CODABAR_ENABLE = &HDE
        HID_USAGE_BARCODE_SCANNER_CD_CODE_39_ENABLE = &HDF

        HID_USAGE_BARCODE_SCANNER_TRANSMIT_CHECK_DIGIT = &HF0
        HID_USAGE_BARCODE_SCANNER_DISABLE_CHECK_DIGIT_TRANSMIT = &HF1
        HID_USAGE_BARCODE_SCANNER_ENABLE_CHECK_DIGIT_TRANSMIT = &HF2

        HID_USAGE_BARCODE_SCANNER_SYMBOLOGY_IDENTIFIER_1 = &HFB
        HID_USAGE_BARCODE_SCANNER_SYMBOLOGY_IDENTIFIER_2 = &HFC
        HID_USAGE_BARCODE_SCANNER_SYMBOLOGY_IDENTIFIER_3 = &HFD
        HID_USAGE_BARCODE_SCANNER_DECODED_DATA = &HFE
        HID_USAGE_BARCODE_SCANNER_DECODED_DATA_CONTINUED = &HFF
        HID_USAGE_BARCODE_SCANNER_BAR_SPACE_DATA = &H100
        HID_USAGE_BARCODE_SCANNER_SCANNER_DATA_ACCURACY = &H101
        HID_USAGE_BARCODE_SCANNER_RAW_DATA_POLARITY = &H102
        HID_USAGE_BARCODE_SCANNER_POLARITY_INVERTED_BAR_CODE = &H103
        HID_USAGE_BARCODE_SCANNER_POLARITY_NORMAL_BAR_CODE = &H104

        HID_USAGE_BARCODE_SCANNER_MINIMUM_LENGTH_TO_DECODE = &H106
        HID_USAGE_BARCODE_SCANNER_MAXIMUM_LENGTH_TO_DECODE = &H107
        HID_USAGE_BARCODE_SCANNER_FIRST_DISCRETE_LENGTH_TO_DECODE = &H108
        HID_USAGE_BARCODE_SCANNER_SECOND_DISCRETE_LENGTH_TO_DECODE = &H109
        HID_USAGE_BARCODE_SCANNER_DATA_LENGTH_METHOD = &H10A
        HID_USAGE_BARCODE_SCANNER_DLM_READ_ANY = &H10B
        HID_USAGE_BARCODE_SCANNER_DLM_CHECK_IN_RANGE = &H10C
        HID_USAGE_BARCODE_SCANNER_DLM_CHECK_FOR_DISCRETE = &H10D

        HID_USAGE_BARCODE_SCANNER_AZTEC_CODE = &H110
        HID_USAGE_BARCODE_SCANNER_BC412 = &H111
        HID_USAGE_BARCODE_SCANNER_CHANNEL_CODE = &H112
        HID_USAGE_BARCODE_SCANNER_CODE_16 = &H113
        HID_USAGE_BARCODE_SCANNER_CODE_32 = &H114
        HID_USAGE_BARCODE_SCANNER_CODE_49 = &H115
        HID_USAGE_BARCODE_SCANNER_CODE_ONE = &H116
        HID_USAGE_BARCODE_SCANNER_COLORCODE = &H117
        HID_USAGE_BARCODE_SCANNER_DATA_MATRIX = &H118
        HID_USAGE_BARCODE_SCANNER_MAXICODE = &H119
        HID_USAGE_BARCODE_SCANNER_MICROPDF = &H11A
        HID_USAGE_BARCODE_SCANNER_PDF_417 = &H11B
        HID_USAGE_BARCODE_SCANNER_POSICODE = &H11C
        HID_USAGE_BARCODE_SCANNER_QR_CODE = &H11D
        HID_USAGE_BARCODE_SCANNER_SUPERCODE = &H11E
        HID_USAGE_BARCODE_SCANNER_ULTRACODE = &H11F
        HID_USAGE_BARCODE_SCANNER_USD_5 = &H120
        HID_USAGE_BARCODE_SCANNER_VERICODE = &H121

        ' (rom) &h122 to &hFFFF are reserved in "HID Point of Sale Usage Tables 1.02" (pos1_02.pdf)
    End Enum

    '
    ' Weighing Device Page (0x8D)
    '
    Public Enum WeighingDevicePage As UShort
        HID_USAGE_SCALE_UNDEFINED = &H0
        HID_USAGE_SCALE_WEIGHING_DEVICE = &H1

        HID_USAGE_SCALE_SCALE_DEVICE_CLASS = &H20
        HID_USAGE_SCALE_SCALE_CLASS_I_METRIC_CLASS = &H21
        HID_USAGE_SCALE_SCALE_CLASS_I_METRIC = &H22
        HID_USAGE_SCALE_SCALE_CLASS_II_METRIC = &H23
        HID_USAGE_SCALE_SCALE_CLASS_III_METRIC = &H24
        HID_USAGE_SCALE_SCALE_CLASS_IIIL_METRIC = &H25
        HID_USAGE_SCALE_SCALE_CLASS_IV_METRIC = &H26
        HID_USAGE_SCALE_SCALE_CLASS_III_ENGLISH = &H27
        HID_USAGE_SCALE_SCALE_CLASS_IIIL_ENGLISH = &H28
        HID_USAGE_SCALE_SCALE_CLASS_IV_ENGLISH = &H29
        HID_USAGE_SCALE_SCALE_CLASS_GENERIC = &H2A

        HID_USAGE_SCALE_SCALE_ATTRIBUTE_REPORT = &H30
        HID_USAGE_SCALE_SCALE_CONTROL_REPORT = &H31
        HID_USAGE_SCALE_SCALE_DATA_REPORT = &H32
        HID_USAGE_SCALE_SCALE_STATUS_REPORT = &H33
        HID_USAGE_SCALE_SCALE_WEIGHT_LIMIT_REPORT = &H34
        HID_USAGE_SCALE_SCALE_STATISTICS_REPORT = &H35

        HID_USAGE_SCALE_DATA_WEIGHT = &H40
        HID_USAGE_SCALE_DATA_SCALING = &H41

        HID_USAGE_SCALE_WEIGHT_UNIT_CLASS = &H50
        HID_USAGE_SCALE_WEIGHT_UNIT_MILLIGRAM = &H51
        HID_USAGE_SCALE_WEIGHT_UNIT_GRAM = &H52
        HID_USAGE_SCALE_WEIGHT_UNIT_KILOGRAM = &H53
        HID_USAGE_SCALE_WEIGHT_UNIT_CARATS = &H54
        HID_USAGE_SCALE_WEIGHT_UNIT_TAELS = &H55
        HID_USAGE_SCALE_WEIGHT_UNIT_GRAINS = &H56
        HID_USAGE_SCALE_WEIGHT_UNIT_PENNYWEIGHTS = &H57
        HID_USAGE_SCALE_WEIGHT_UNIT_METRIC_TON = &H58
        HID_USAGE_SCALE_WEIGHT_UNIT_AVOIR_TON = &H59
        HID_USAGE_SCALE_WEIGHT_UNIT_TROY_OUNCE = &H5A
        HID_USAGE_SCALE_WEIGHT_UNIT_OUNCE = &H5B
        HID_USAGE_SCALE_WEIGHT_UNIT_POUND = &H5C

        HID_USAGE_SCALE_CALIBRATION_COUNT = &H60
        HID_USAGE_SCALE_RE_ZERO_COUNT = &H61

        HID_USAGE_SCALE_SCALE_STATUS_CLASS = &H70
        HID_USAGE_SCALE_SCS_FAULT = &H71
        HID_USAGE_SCALE_SCS_STABLE_AT_CENTER_OF_ZERO = &H72
        HID_USAGE_SCALE_SCS_IN_MOTION = &H73
        HID_USAGE_SCALE_SCS_WEIGHT_STABLE = &H74
        HID_USAGE_SCALE_SCS_UNDER_ZERO = &H75
        HID_USAGE_SCALE_SCS_OVER_WEIGHT_LIMIT = &H76
        HID_USAGE_SCALE_SCS_REQUIRES_CALIBRATION = &H77
        HID_USAGE_SCALE_SCS_REQUIRES_REZEROING = &H78

        HID_USAGE_SCALE_ZERO_SCALE = &H80
        HID_USAGE_SCALE_ENFORCED_ZERO_RETURN = &H81

        ' (rom) &h82 to &hFFFF are reserved in "HID Point of Sale Usage Tables 1.02" (pos1_02.pdf)
    End Enum

    '
    ' Magnetic Stripe Reader Page (0x8E)
    '
    Public Enum MagneticStripeReaderPage As UShort
        HID_USAGE_MSR_UNDEFINED = &H0
        HID_USAGE_MSR_MSR_DEVICE_READ_ONLY = &H1

        HID_USAGE_MSR_TRACK_1_LENGTH = &H11
        HID_USAGE_MSR_TRACK_2_LENGTH = &H12
        HID_USAGE_MSR_TRACK_3_LENGTH = &H13
        HID_USAGE_MSR_TRACK_JIS_LENGTH = &H14

        HID_USAGE_MSR_TRACK_DATA = &H20
        HID_USAGE_MSR_TRACK_1_DATA = &H21
        HID_USAGE_MSR_TRACK_2_DATA = &H22
        HID_USAGE_MSR_TRACK_3_DATA = &H23
        HID_USAGE_MSR_TRACK_JIS_DATA = &H24

        ' (rom) &h25 to &hFFFF are reserved in ""HID Point of Sale Usage Tables 1.02" (pos1_02.pdf) 
    End Enum
End Module
